Multiple AND Condition in Select Statement on DataTable

Hi Friends,
I am able to use select query for single conditions like:-
dt_questionsData.Select(“[ID]=‘6’ AND [Number]=‘161’”).CopyToDataTable
but I want to apply multiple and Conditions with where clause on datatable.

I try like this:-
dt_questionsData.Select(“[ID]=‘6’ AND [ID]=‘7’ AND [ID]=‘8’ WHERE [Application ID]=‘161’”).CopyToDataTable

then i got error like :- Syntax missing after WHERE operator
Please help me over this.

1 Like

Hi @Rup_1

Instead of Where you can use and operator

Th@nks

@shwin.S

1 Like

Hi @ AshwinS2

I tried but i got error like “can not find column [6]”

1 Like

Note that filter inside datatable.select already works as a where clause. Per your scenario, you want to filter Application ID Column first before filtering the ID Column. Basically, you will do two select function to achieve your desired results.

dt_questionsData.Select(“[Application ID]=‘161’”).CopyToDataTable.Select(“[ID]=‘6’ AND [ID]=‘7’ AND [ID]=‘8’”).CopyToDataTable

1 Like

If you feel no so sure about your codes you can use the filter data table activities @Rup_1

cheers :smiley:

Happy learning :smiley:

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.