Using SQL query with column as parameter?

New Contributor

Hi. This seems like a simple problem but I'm having trouble finding a solution for pulling data from a SQL database using an existing worksheet column as a parameter. 


I have a Column A and Column B. I want to populate Column B using an existing query with Column A as the parameter or "Where" statement. 


I have it working to execute on a single cell but can't figure out how to execute the query on all cells in the Column A. 

3 Replies

@anuyen , what do you mean to take column as parameter? Value from each cell will be combined with AND condition under WHERE to query the SQL database?

@Sergei Baklan well the values in column A have a corresponding value in the query, so I'd like to run the query, for example, where column a = a1, a2, a3, a4, a5, a6 etc. 

@anuyen , not sure tat works such way. You may query your SQL database selecting two columns and after left join by PQ your source column with returned from SQL.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies