Page 1 of 1

How to get an SQL statement with expanded macros / where / orderby and params ?

Posted: Fri 27 Nov 2015 08:10
by swierzbicki
Hello,

How to get an SQL statement with expanded macros / where / orderby and params ?
FinalSQL doesn't expand Parameters.

Thank you

Re: How to get an SQL statement with expanded macros / where / orderby and params ?

Posted: Mon 30 Nov 2015 06:39
by AlexP
Hello,

If you want to retrieve the query text with parameter values being already pasted, you need to parse the query text in the OnSQL event and paste parameter values instead of their names, that can be retrieved with a loop through all parameters.

Re: How to get an SQL statement with expanded macros / where / orderby and params ?

Posted: Tue 01 Dec 2015 17:04
by swierzbicki
Hello Alex,

Is there any reasons why FinalSQL doesn't expands parameters ?

BR

Re: How to get an SQL statement with expanded macros / where / orderby and params ?

Posted: Wed 02 Dec 2015 08:32
by AlexP
This is because of the fact that in majority of servers parameters are not set in the query, but binded.