How to retrieve data from non execute query

Hello Everyone,

I want to retrieve the data using non execute query. After running this query I am able to print the affected records. Could any one suggest what should I do to print the values which I retrieved from database. I researched on it but, I am in a bit confusion whether to use data table or any other. Could any one suggest.


1.If the result of your Query is Datatable
2.If you want to print in output then use output datatable activity
3.Give your datatable variable and string variable(Create one string variable)
4.Mention that string variable in log message you can print that in output.
5.If you want to print in Excel sheet then use WriteRange activity directly and give your dataTable variable in properties.


Thank you for your valuable suggestion.
But, Its not the issue what I am facing. Here are the steps of my workflow

  1. Connected to SQL database.
  2. Executed non query
    SELECT Firstname, Lastname from employee1 where Sno491
  3. After executing this I used message box in which I am able to print the no of affected records i.e; -1
    Now, I want to print Firstname, Lastname. I don’t think that we can use output datatable directly.
    Could you please suggest.

Hello Guys,

I have a small doubt. Is it possible to get the values into datatable directly which we retrieved from database.

1 Like

Execute Non query is for data manipulation.

You should use Execute Query - Output is a datatable

Yes, I got it. Thank you vvaidya.

Yes U will Try