Hello.
In my data source SQL Script, I would like to check if a variable is null and if it's not, then use the variable to complete a SQL query, something like this:
SELECT (...)
FROM (...)
AND (...)
{doctor != "" ? " AND (something.fk_doctor= {doctor}") : ""}
so, 'doctor' is a variable from stimulsoft and I would like to use it in the middle of the expression below.
It's saying my SQL syntax is incorrect.
How can I use a variable in the middle of an expression but in quotation marks?
How to use a variable in the middle of an expression?
-
- Posts: 14
- Joined: Mon Aug 21, 2017 5:10 pm
Re: How to use a variable in the middle of an expression?
Hello,
Could you explain your task in more details, about {doctor} variable, where are you set value for this variable?
Thank you.
Could you explain your task in more details, about {doctor} variable, where are you set value for this variable?
Thank you.