Hi ,
I have to pull these dates form our Taradata datawarehouse in this format 30APR2015 and it's a date9. format
I am trying SAS SQL to pull trhe date but getting no results...error actually.
I tried :
where date = '30APR2016'
where date = '30APR2016'd
where put (date, date9.) = '30APR2015'
where put (date, yymmdd10.)= '30APR2015'
where put (date, yymmdd9.)= '30APR2015'
where input (date, yymmdd10.)= '30APR2015'
where input (date, yymmdd9.)= '30APR2015'
Nothing works...
Got this error:
ERROR: Teradata prepare: Syntax error: Data Type "snap_dt" does not match a Defined Type name.
SQL statement was: select * from ddwv01.MORTG_CLM_LOSS as LP where put(snap_dt, yymmdd9.)
= '30APR2016'.
Any suggestions? Thanks.
I would pull the date in it's current format. If you need to change it to date9. do it in SAS after you have the dataset.
proc sql
Start by doing a simple:
create temp_dataset as select * from your_table
Now, goto your work library, and open the properties of the temp_dataset. What format is the variable in question, what data does it hold? Post a proc contents if your still having problems, and some of the data.
Thanks everyone...
This worked :
WHERE DATE = DATE'2016-04-30'
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 save with the early bird rate—just $795!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.