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
How would you identify a macro variable? : sas-macro
Difference between informat and format?
describe the interaction table in sas di? : Sas-di
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
I have a dataset concat having variable a b & c. How to rename a b to e & f?
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
What makes sas stand out to be the best over other data analytics tools?
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
Give some examples where proc report’s defaults are different than proc print’s defaults?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
what is SAS OPTIMIZATION?
What is the difference between SAS functions and procedures?
How do dates work in SAS data?
explain the proc in sas? : Sas-administrator
how does sas handle missing values in assignment statements? : Sas programming