Hi guyz,
Recently i encountered a situation where i need to use conditional query building using the (#If - #EndIf) syntax.
e.g. :
SELECT
FROM
WHERE
#if (&MacroName = )
#endif
Order by
Where value of the macro 'MacroName' is passed through inline code.
But I was not able to execute this Query as (#If - #EndIf) is not supported by SDAC
Can some one kindly suggest me what is the work-around for this?
Regarding Macros in SDAC.
SDAC doesn't support such functionality.
You can modify your query like the following:then assign the following value to this macros:
and just turn it off or on depending on your conditions:
You can modify your query like the following:
Code: Select all
SELECT FROM
WHERE
&MacroName
Order by
Code: Select all
MSQuery1.MacroByName('MacroName').Value := '';
Code: Select all
MSQuery1.MacroByName('MacroName').Active := IsMacrosValueNeeds;