Hi,
with SQL I want to create a new table from another and want to add a emtpy character-column. That works. But: The length is only 1 and only the first letter appears. Question: Does the sql-step has the option to define the length? For example like that (doesnt work):
proc sql;
create table test as select
"" char(20) as GKL2,sum(bev) as bev
from XY;
quit;
Thank you!
Hi @Konkordanz,
Replace char(20) with length=20 and it will work. You can also put the length specification after the variable name and either way length 20 works as well.
Hi @Konkordanz,
Replace char(20) with length=20 and it will work. You can also put the length specification after the variable name and either way length 20 works as well.
Great, Thx!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.