upspeaker1
Programmer
I'd like some help constructing a proc sql step. I have a query like
PROC SQL;
SELECT title, rating, category
FROM movies
WHERE category LIKE 'D%';
QUIT;
What I'd like to do is make the D a macro variable i.e change at run time depending on user input but retain the % sign. Do I need to use a quoting function? If so which one; I have tried using %SUPERQ, %NRSTR, %STR, %BQUOTE, %NRBQUOTE and none of them worked. Would be very glad for any help with this.
Rgds
PROC SQL;
SELECT title, rating, category
FROM movies
WHERE category LIKE 'D%';
QUIT;
What I'd like to do is make the D a macro variable i.e change at run time depending on user input but retain the % sign. Do I need to use a quoting function? If so which one; I have tried using %SUPERQ, %NRSTR, %STR, %BQUOTE, %NRBQUOTE and none of them worked. Would be very glad for any help with this.
Rgds