Hi ,
I have a date stored in a macro variable (RUN_DATE) which is resolving to 06NOV2019.
I want to store this value in a oracle table with number format like 20191106.
In SAS DI studio I tried using input(&RUN_DATE,DATE9.) in the expression column and in format I selected yymmdd10.
But its giving error ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, ',', -, /, , =, , =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=. Line 3,986: ERROR 76-322: Syntax error, statement will be ignored.
Please help.
Now I used two transformations ,first is Extract in that did the same thing (INPUT("&RUN_DATE.",DATE9.)) as RUN_DATE but format I used now is yymmddn10(before it was yymmdd10.)
Next I used table loader transformation in that I used (input(put(RUN_DATE,yymmddn8.),best12.)) as RUN_DATE.
And it worked fine for me.
Thanks all for your valuable suggestions.
Double quotes also not working
Show us the LOG, so we can see the code you are using and also the error messages.
Please copy the log AS TEXT, then here in the SAS Communities, click on the {i} icon and paste the log AS TEXT into the window that appears. Do not skip this step.
@kk21 wrote:
Hi ,
I have a date stored in a macro variable (RUN_DATE) which is resolving to 06NOV2019.
I want to store this value in a oracle table with number format like 20191106.
In SAS DI studio I tried using input(&RUN_DATE,DATE9.) in the expression column and in format I selected yymmdd10.
But its giving error ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, ',', -, /, , =, , =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=. Line 3,986: ERROR 76-322: Syntax error, statement will be ignored.
Please help.
An error message without code is like calling a mechanic over the phone and asking why is my car not running.
Now I used two transformations ,first is Extract in that did the same thing (INPUT("&RUN_DATE.",DATE9.)) as RUN_DATE but format I used now is yymmddn10(before it was yymmdd10.)
Next I used table loader transformation in that I used (input(put(RUN_DATE,yymmddn8.),best12.)) as RUN_DATE.
And it worked fine for me.
Thanks all for your valuable suggestions.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.