Hello everyone,
I have a table that goes like this:
123
456
789
(...)
I then want to connect to a DB table and perform a SELECT statement, using all the values from that table, for example:
SELECT * FROM db.Table WHERE Number = '123' and Number = '456' and Number = '789'
Any suggestion on how to do this? Thank you!
Solved! Go to Solution.
Assuming your SQL supports IN function like
SELECT * FROM db.Table WHERE Number IN ('123','456','789')
. You can convert the to like below
You can dynamic input tool to modify the part of the query and pass the values
Refer this video from 8:50th Min https://www.youtube.com/watch?v=ELfKYatOJZM
Hope this helps : )
Hi @cutehappybear,
You can use a Summarize Tool to concatenate all the values in your table first. This is how you can configure it:
Afterwards you can use a Dynamic Input Tool to connect to your SQL database with a query by pressing the Edit button similar to the following:
Then you can select the Modify SQL Query option and choose Replace a Specific String or SQL: Update WHERE Clause to make this query dynamic
Now you should able to get the data that you want after running the workflow.
Hope it helps!!