Boopathi
(Boopathi Manogar)
June 18, 2020, 7:43am
1
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
ppr
(Peter Preuss)
June 18, 2020, 7:53am
2
@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
Boopathi
(Boopathi Manogar)
June 18, 2020, 7:58am
3
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
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.
bnastase
(Bobby)
June 18, 2020, 8:00am
4
Try TransactionDataTable.Select(“Amount=‘Extractedamount’ And (Date=‘NewDate1’ OR Date=‘NewDate2’)”).CopyToDataTable
ppr
(Peter Preuss)
June 18, 2020, 8:03am
5
@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 #
I’m trying to filter out date time of excel but having hard luck ,
can someone help me out?
[image]