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!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.