you can assign length in Teradata using decimal(10,0) but the SAS dataset you created will still have the length of 8 bytes.
The data functions will not work while you are running the code in Teradata using sql pass through. The belw should should give you the desired output. Let me know if this works.
proc sql;
connect to teradata as tera1 (user="xxxxxx" password="xxxxxxx" server="xxxxx"
tpt=yes fastexport=yes);
create table mytable as
select * from connection to tera1
(select age
,entityno
,cast(segid as varchar(10)) fbu1
,cast(profgrp_id as varchar(30)) trnsid
,cast(accno as varchar(20))accno
,cast(startdt as varchar(10)) startdt
,cast(enddt as varchar(10)) enddt
from mytable
where age > 15 );
disconnect from tera1;
quit;
You don't have to specify length to the numeric columns.
In SAS, the default length of a numeric variable is 8 bytes. . The limit is NOT 8 digits but 8 bytes. 8 bytes means we can store up to 16 digits for a numeric variable in SAS.
you can assign length in Teradata using decimal(10,0) but the SAS dataset you created will still have the length of 8 bytes.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.