I'm fetching data through an SQL statement in PowerQuery:
let
Source = Oracle.Database("sampleDB", [Query="SELECT * FROM mySampleTable WHERE CustomerID in (1,2,3,4,5)"])
in
Source
I need the SQL filter to be dynamic. So I have another query with a single cell containing a text string. For the example above, the single cell looks like => "1,2,3,4,5". This is why I want to build a dynamic SQL statement in PowerQuery that references that single cell from my other query.
I've tried the code below and other variants but none work!:
let
Source = Oracle.Database("sampleDB", [Query="SELECT * FROM mySampleTable WHERE CustomerID IN (" & MyReferenceQuery["SingleCell"] & ")"]
in
Source
How can I reference this other query?