Forum Discussion
How to pass a value to SQL DB DirectQuery where condition
- 1 year ago
Hi Tracy000
You can right click on your query and change it into a parameter.
Then connect to SQL put your code under the Advanced section.
After your code has connected, on the right hand side under Applied steps click on Source (not the cog).
This will show your code in the M editor above your table.
Go to where you want to pass in the parameter and split the SQL script using '" & yourparameter & "' that will insert your parameters value into the code 🙂
Hi Tracy000
You can right click on your query and change it into a parameter.
Then connect to SQL put your code under the Advanced section.
After your code has connected, on the right hand side under Applied steps click on Source (not the cog).
This will show your code in the M editor above your table.
Go to where you want to pass in the parameter and split the SQL script using '" & yourparameter & "' that will insert your parameters value into the code 🙂
- Tracy0001 year agoHelper I
Hi SamWiseOwl ,
Many thanks for your reply and suggestion.
I used this format '" & yourparameter & "' in M editor without converting query to parameter, then it works.