I want to know how to pass excel output into the SQL queries for find matched values

here my query
select * from datatable where column_name in(acc_no,’ ‘,’ ')
here acc_no is dynamic from excel column

@Veera_Raj, Excel output you mean a DataTable/Row?

yes, i have to take that acc_no from acc_no column in excel and find mathced values from the sql database the column name is acc_number

You can try that by looping through your Excel Datatable.

Use CurrentRow(0).Item(“acc_number”).ToString.Trim. Assign a variable to that expression and pass that to your SQL Query.

P.S. CurrentRow is the Iterable for your DataTable.

@ManiPrajwal_K but i dont know how to pass that assign inside SQL query. can you tell me please ?

Here you go:

Create an In Argument and pass the assign activity variable in the Parameters.

P.S. Use @ in front of your argument in the SQL Query.

Hi

Welcome to uipath forum

Check this thread for more details on how handle dynamic values in sql with a variable

Cheers @Veera_Raj

1 Like

thank you so much @ManiPrajwal_K i am going to try that

thank you so much @ManiPrajwal_K i am going to try that