Forum Discussion
anuyen
Mar 25, 2019Copper Contributor
Using SQL query with column as parameter?
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 Colum...
SergeiBaklan
Mar 25, 2019Diamond Contributor
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?
anuyen
Mar 25, 2019Copper Contributor
SergeiBaklan 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.
- SergeiBaklanMar 25, 2019Diamond Contributor
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.