Forum Discussion
Binding text filter to parameter
What is your source system? I am guessing it is NOT SQL Server.
Maybe try this:
In Power Query, create a BLANK query, (let's call it "MyQueryText") then use the Advanced Editor to set it to the big long query you have above. Enclose the whole thing in quotes. Click on the query and read the result (NOT in Advanced editor). Does it made sense when you enter values for your parameters?
Edit the main query to have a statement like this: [Query = MyQueryText] so that it 'runs' the query text from MyQueryText.
Hi
I'm using SQL Dtabricks
- ToddChitt1 year agoSuper User
Try the trick of separaging the actual query text, with its embedded parameters, from the query that connects to DataBricks and RUNS that query. This is a great way to review the results of the query text itself to see if it makes sense, correct syntax, correct placement of single and double quotes, etc.
For example, does the sample following syntax work:
WHERE CAST(D.BELNR AS STRING) LIKE ('ABC123')
?
If you can get the query to work with literal values like above, only THEN start by replacing those literal values with respective paramters, and every time, check the output of the QueryText to make sure it has gotten the right syntax.