08-30-2012 08:16 AM
I am uploading a table on SQL Serever from SAS Enterprise Guide, while doing that I am not getting date in correct format:
in SAS dates are : 03AUG2009
after uploading on SQL Serever dates are in text : 2009-08-03
Can anybody please guide me How can I correc them while uploading the data.
08-30-2012 09:50 AM
How is define you Date column in your input data ?
Here a sample to see the diffrence beetween data and the format display.
format mydate mydate2 date9.;run;
It depend also of with engine you use to insert ?
A good solution be to do a extraction of a strcuture of you target table as
PROC SQL INOBS=1 OUTOBS=0;
CREATE TABLE WORK.target_template AS * from SELECT MSSQL.target;
try to insert in this template to verify you input data;
If you insert to this table is good you cab do a
proc append data=target_template base=MSSQL.target force;run;
I cuold not provide the good solution without more information.