Luke101
Luke101

Reputation: 65268

How to get a row by column name

I am trying to get a column value by name instead of by ordinal. Here is the code I already have:

SELECT trim([Workitem Id]) as [Workitem Id1] from 1.csv

above is the query

rrm.id = oDR["Workitem Id"] == DBNull.Value ? string.Empty : oDR["Workitem Id"];

When I run this query I get too few parameters expected error.

Upvotes: 0

Views: 383

Answers (1)

Mike Park
Mike Park

Reputation: 10941

Your column name is actually Workitem Id1 is it not?

Upvotes: 1

Related Questions