Can we use where and having clauses in a single SAS program.
ex: proc sql;
select a,b,c from test
where state in 'KA'
and having <some condition>.
Is the above program run correctly, if not why ?
Answer Posted / rajasekaran
having statement should mentioned after group by statement only
proc sql;
select a,b,c from test
where state in 'KA'
group by xyz
and having <some condition>.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Are you sensitive to code walk-throughs peer review or QC review?
Mention sas system options to debug sas macros.
how would you determine the number of missing or nonmissing values in computations? : Sas programming
What do you know about sas data set?
What are the difference between sas functions and procedures?
what is slowly changing dimension? : Sas-di
What is a method to debug and test your SAS program?
how does sas handle missing values in assignment statements? : Sas programming
What commands are used in the case of including or excluding any specific variables in the data set?
what is operational data and operational system? : Sas-di
Explain data step in SAS
What is the purpose of _character_ and _numeric_?
what are all the reports you generated in your recent project?
How can I remove header from output data set?
explain about data integrator metadata reports? : Sas-di