Documentation SQL Query using inline variable
151
Views
3
Comments
New
Documentation

In the documentation please add an explanation of how to run an SQL query that has been placed in a variable.

I could not find the method in documentation, but it is very simple.

In the expression editor you put: 

@<your variable name>

and set the SQL to inline: Yes  (defaults to No)

(So simple when you know how, but very frustrating when you don't)

Hi, Daniel,

Yes, I had already read those pages and several others about SQL. Obviously, I could have missed it, but I don't think any of the pages refer to this topic.

They seem to be dealing with using @variables inside an otherwise pre-typed query. 

I didn't see anything about using single @variable that contains the entire query.


Greg



@Greg Adams ,

that's just a matter of degree, not an entirely different thing

there is plenty of explanation of using parameters with option expand inline to true, with the accompagning warnings about the dangers.  

This is just that, but taken to the extreme.

Dorine