08-10-2015 11:52 AM
I'm having hard time with date format of SAS to Teradata data upload.
My is as below.
here X is my Teradata library. Y is my SAS library
create table X.pace as
select division_name, region_name, lob, bus_res,activity, fme , date, qty from Y.pace;
Date format is not as expected. how exactly should I select the query to pass the correct date format.
08-10-2015 12:01 PM
What do you expect a date to look like in Teradata?
How does it look like in SAS?
If you go to the MORE LIKE THIS section on the right hand side of the page on your question you'll see several answers to this common question.
08-10-2015 12:33 PM
In your Y.pace table, does the "date" field have a date format attached? Sometimes SAS uses that as an indicator to create a different column format in the target database.
You can use this code to associate a date format with the variable:
proc datasets library=Y nolist;
format date date.;
If "date" is a datetime variable, use the datetime. format instead of date.
08-10-2015 12:38 PM
Should work fine. How is it different?
What did the SAS log show? Did you turn on displaying the generated Teradata SQL code?
libname X teradata server=&server username=&username password=&password
connection=global mode=teradata database=&userdb
data pace ;
length division_name region_name lob bus_res activity fme $20 ;
length date qty 8;
format date date9. ;
informat date date9. ;
input division_name -- qty ;
division_name region_name lob bus_res activity fme 09AUG2015 100
set x.pace ;
put (_all_) (=/);