How to get data form SQL query row by row

Hi all,

I want to get the SQL data row by row with the specific column name and write the data into the google sheet.



Use Connect activity and configure your connection string and test the connection

Once done use Execute query activity as below

This will store to a datatable

Now use gsuite activities to write to google sheets

Hope this may help you


Hi @pavadharani_p

  • Install the UiPath.Database.Activities (Manage packages)
  • Use Connect Activity - test the connection
  • Use Execute Query Activity output is stored in “query_Dt” a data table.

Refer to the Link:

Here is the sample workflow
Main.xaml (6.0 KB)


I want get Markout and totaloffer of row one and paste to Google sheet in uipath

Hi @pavadharani_p

Here is the SQL Query

  • Use in Execute Query Activity
    Select Markout and totaloffer from Table_Name

Refer to the Link:

Hi @pavadharani_p

You can write query as

select MARKOUT, TOTAL_ORDER FROM table_name
this will give you all row with two columns

select top(1) MARKOUT, TOTAL_ORDER FROM table_name
this will give you first row

Hi @ermanoj3101

I am not supposed to change the query from the above table I have to take column value of markout and totol_order row by row and paste in google sheet in specific column

One row value in one column D and second in column I and so on