I'm trying to dump a SAS dataset to a MS SQL server. The SAS dataset contains a datetime that I can't seem to enter correctly into the database.
proc sql;
insert into mssql.dump_data (date, field1, field2, field3)
select date format=yymmddd10., field1, field2, field3 from local.dataset_model;
quit;
When I run this, the SQL database shows 01JAN1960:04:53:43.000. The dataset show s the date as 01MAR08 and as being a DATE7.
I figured that SAS is returning it's date as a numeric that SQL interprets incorrectly. However, if I tell SAS to return the date as a string, SAS complains and says does not match the data type.
Can anyone help?
Thank you!!
... View more