Hello all, Sorry for the confusing title -- not sure how to phrase it. In the code below, I'm looking into a Netezza table (Data step won't work) and deleting current period records if they exist. The issue is, how to represent the value of 202212 as ym_id is a character/text field (don't ask me, I didn't create the database). If I hard-code '202212' then it works I need to keep &period as 202212 since it's used throughout the program. If I use &period then I get ERROR: Expression using equals (=) has components that are of different data types. If I use &qperiod it resolves to '202212' but then I get the error ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, (, *, +, -, ALL, ANY, BTRIM, CALCULATED, CASE, INPUT, PUT, SELECT, SOME, SUBSTRING, TRANSLATE, USER Would anyone help me please with this macro issue? Thank you /******** CODE IN QUESTION **************/ %let period = 202212; %let qperiod = %str(')&period%str('); proc sql noerrorstop; delete from core.mytable where ym_id = . quit;
... View more