I need your help. When you have a query that runs against a SQL Table and returns data into 3 columns, how do you put these results a collection that you can use. Is there a way to do this?
For Example: My sql table returns the following results
I think my effort has been able to get the first column value but not the 2nd or 3rd column.
What am I missing?
In the Execute SQL action, right under the Query section, you'll see a "Column to retrieve" box. There you just specify the name of the column you want to retrieve and click "Add" button. This now appears with a drop down next to it beneath the add area, and you can select a collection to which you want to store the values.
Hope this helps,
Yes I see that option but how do I get all the results in the query? When I tried that I got the first results but how do I get 2nd record and 3rd etc?
I guess my confusion is if my SQL is returning many records how do I get the values from that 1 SQL Execution.
Currently I have done many of these where I run the first query to get the value that will give me unique record and I loop through the first query and passing the unique value to get the rest of the fields. In the current situation I don't have a unique field. I hope my explanation is clear.
I reread the original post and following what I said previously: You will be using the "Get" operation within a Collection Operation action - you will have one of these actions for every column of data. You will use the same "index" which is a number type variable within your loop to get the data from each collection to form a row of data.