Forum Discussion
Anonymous
8 years agoNot applicable
Insert Parameter in M language
Hi, I'm trying to build a Parameterised Query using M Language. I have my variables stored as text fields but when I add them to the final query, it doesnt seem to pick up the string but just ret...
- Anonymous8 years ago
Hi All,
So after many variations, it turns out it's the same as VBA without spaces. I was building a Paramaeterised Query and wanted a single place to change the value and it update the 6 Queries I have.
The Date value appeared like this "201801", so I created a variable and then managed to insert that using ""&Date&""
All working, thanks for you help. :)
ImkeF
8 years agoCommunity Champion
Make sure you don't use escape signs (") when referencing your variables.
If they have blanks or special characters, you have to write it like so:
#"My Variable"
The # escapes the escapes ;)
So you can either reference your variable so:
MyVariable or #"MyVariable", but NOT: "MyVariable"