if i having variables named a b c d e f ,how to find total of
each variable ????give syntax...??
Answer Posted / anik chatterjee
The last answer is right but if all the values are missing
then sum function will give a note in log. Best way to add
0 with all value. Hence if all value is missing then total
would be 0 and no note will be there.
proc sql;
create table SUM as
select sum(a) as sum_a,
sum(b,0) as sum_b,
sum(c,0) as sum_c,
sum(d,0) as sum_d,
sum(e,0) as sum_e,
sum(f,0) as sum_f
from input_dataset_name;
quit;
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
How many ways to overcome a missing values???
explain about various caches available in data integrator? : Sas-di
Difference between SAS STATA & SPSS?
What do you know about sas and what we do? : sas-grid-administration
what are the categories that sas informats are used to the place the data? : Sas-administrator
what is ae onset date n what is RDS
What is SAS?
What are symget and symput? : sas-macro
Differentiate between ceil and floor functions.
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
Do you know the features of sas?
Compare sas with other data analytics tools.
What is run-group processing?