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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.