All Forums Database
19 May 2008
Concatenation in Macro

I am writing a macro with a parameter and I need to concatenate this parameter as where condition for the select statement in the macro.Create macro mymacro (whereCondition varchar(100)) As(select myno,myname,myaddress from mytable where ||' '|| :whereCondition;);this is giving error3706: Syntax error: expected something between the 'where' keyword and '"||"'.Output directed to Answerset windowif someone having it's solution please let me know...Thanks,

Grao 48 posts Joined 08/06
19 May 2008

Hi,Hope this helps:create macro macro_nm(wherecond varchar(10)) as( sel * from tbl_nmwhere col_nm= :wherecond ;);


You must sign in to leave a comment.