Please post the whole code that created this dataset. Use the "little running man" to post code.
Since the original values are in decimal format, you will need the double cast.
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(cast(segid as format 'Z(I)') as varchar(50)) as fbu1
,cast(cast(profgrp_id as format 'Z(I)') as varchar(30)) as trnsid
,cast(accno as integer)as accno
,cast(cast(startdt as format 'Z(I)') as varchar(10)) as startdt
,cast(cast(enddt as format 'Z(I)') as varchar(10)) as enddt
from mytable1 a
Mytabke2
where age > 15 );
disconnect from tera1;
quit;
Let me know if this helps.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.