Question

Filter Datatable based on specific values

  • 1 February 2023
  • 3 replies
  • 739 views

Badge +1

Is there a way to filter Datatable based on specific columns using inbuilt Datatable package or other packages? For example, Suppose we have a Datatable with columns “Name and ID”. I want to filter all the data with specific name and ID.

 

Note - I do not want to use loops since the number of data is high and also cannot write the data to excel and use excel as database query, due to certain limitations in the client environment.


3 replies

Userlevel 7
Badge +13

 Hi @anandc ,

 

You can use WHERE in the SELECT query for this requirement. Below is an example. However, depending on the result set, you may still need to loop through the query result for getting each value from it.

 

SELECT * FROM [Sheet1$$] WHERE (Name) = ‘John’ and (ID) = 1234 

Badge +1

 Hi @anandc ,

 

You can use WHERE in the SELECT query for this requirement. Below is an example. However, depending on the result set, you may still need to loop through the query result for getting each value from it.

 

SELECT * FROM [Sheet1$$] WHERE (Name) = ‘John’ and (ID) = 1234 

Thanks for the answer @Padmakumar . Could you please help on which action can be used to pass this query? 

Userlevel 7
Badge +13

 Hi @anandc ,

 

You can use WHERE in the SELECT query for this requirement. Below is an example. However, depending on the result set, you may still need to loop through the query result for getting each value from it.

 

SELECT * FROM [Sheet1$$] WHERE (Name) = ‘John’ and (ID) = 1234 

Thanks for the answer @Padmakumar . Could you please help on which action can be used to pass this query? 

 

I am sorry. I misread your question. This is for the Database package, and for this, you can use the Database: Read action.

Reply