Mar 25 2019 11:22 AM
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.
Mar 25 2019 11:51 AM
@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?
Mar 25 2019 12:00 PM
@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.
Mar 25 2019 01:18 PM
@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.