Missing operand after where operator

Hi Team,

I am using the below query in an assign operator but it throws error as missing operand after where operator

Extractedamount is variable contains 15

TransactionDataTable.Select(“Amount=‘Extractedamount’ where Date in(‘NewDate1’,‘NewDate2’)”).CopyToDataTable

not sure what the syntax error. Could anyone help me on this?

Thanks,
Boopathi

@Boopathi
the syntax used in select is not 1 to 1 equal to SQL. Have an initial impression on the syntax here:
https://www.csharp-examples.net/dataview-rowfilter/

I would suggest to put the filter statement into the select expression. the row selection can be done e.g with a filter datatable activity or via the defaultView approach

1 Like

Hi @ppr

actually i am getting a result DT like this and using filter datatable activity i am not able to filter both the date values

image

I have a variable Check, amount, code with some values

I am checking these values against check amount code values in Result DT for both the dates. If it matches then success or failure.

Try TransactionDataTable.Select(“Amount=‘Extractedamount’ And (Date=‘NewDate1’ OR Date=‘NewDate2’)”).CopyToDataTable

@Boopathi
have a look here on how it can be worked with dates within the select expression syntax. have a special look on the surrounding #