DATA Step, Macro, Functions and more

put() function error proc sql

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

put() function error proc sql

please assist me with this problem .

proc sql noprint;

          select case

                              when SOME_ATTRIBUTE= 'Monthly' then put(intnx('dtDAY',DATETIME_VAR,1,'s'),best32.)

                              when SOME_ATTRIBUTE = 'Daily'    then put(intnx('dtMONTH',DATETIME_VAR,1,'s',best32.)

                    end

          into : mvNextDate

          from work.SOME_TABLE

run;

ERROR 22-322: Syntax error, expecting one of the following: a name, *.


Accepted Solutions
Solution
‎09-30-2011 07:34 AM
Frequent Contributor
Posts: 84

put() function error proc sql

In case you copied the code directly, you have forgotten a close parenthesis in the second statement between 's' and ,best32.

Instead of put(intnx('dtMONTH',DATETIME_VAR,1,'s',best32.) it should be put(intnx('dtMONTH',DATETIME_VAR,1,'s'),best32.)

View solution in original post


All Replies
Solution
‎09-30-2011 07:34 AM
Frequent Contributor
Posts: 84

put() function error proc sql

In case you copied the code directly, you have forgotten a close parenthesis in the second statement between 's' and ,best32.

Instead of put(intnx('dtMONTH',DATETIME_VAR,1,'s',best32.) it should be put(intnx('dtMONTH',DATETIME_VAR,1,'s'),best32.)

New Contributor
Posts: 3

put() function error proc sql

OK, thanks a lot .

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 250 views
  • 0 likes
  • 2 in conversation