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 / a.k.naidu
Having clause can be used only with 'group by'. Difference between 'where' and 'having' is that former works on variable level and latter works on observation level. 'having' works like second where condition on "grouped data"
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the functions used for character handling?
what are sas bi dashboard components? : Sas-bi
How do dates work in sas?
How long can a macro variable be? A token? : sas-macro
What do the mod and int function do? : Sas programming
Are you sensitive to code walk-throughs peer review or QC review?
What are the new features included in the new version of SAS Programming Language?
To what type of programms have you used scratch macros?
what is proc Index? and what is proc document?
explain what is data set in sas? : Sas-administrator
name some data transformation used in sas di? : Sas-di
I have a dataset concat having variable a b & c. How to rename a b to e & f?
what is the basic structure sas administrator? : Sas-administrator
What’s the difference between var b1 – b3 and var b1 — b3?
which features do you use to check the data validations and errors? : Sas-administrator