Hi,
in my dataset Kredit1 I want to sum the values of the column c3 and want to copy the result into a new row of the same table. That works. But: The result has no or only one decimal-digit. The aim is: 3 decimal-digits.
I use the following code...is there a option for this code, which could help?
proc sql noprint;
select sum(c3) into :Gem3 from Kredit1;
quit;
proc sql;
insert into KREDIT1 (NameBST,c3)
values ("Gem",&Gem3);
quit;
Apply the desired format to the sum
Example:
proc sql noprint;
select sum(c3) format=10.3 into :Gem3 from Kredit1;
quit;
Apply the desired format to the sum
Example:
proc sql noprint;
select sum(c3) format=10.3 into :Gem3 from Kredit1;
quit;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.