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


Please Help Members By Posting Answers For Below Questions

what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

991


what is sas business intelligence? : Sas-bi

867


What is the difference between %put and symbolgen? : sas-macro

967


what is hierarchy flattening? : Sas-di

870


What are the five ways to do a table lookup in sas? : sas-grid-administration

858


Describe the ways in which you can create a macro variable?

869


Explain bmdp procedure?

836


what does the run statement do? : Sas programming

825


What is the purpose of trailing @ and @@? How do you use them?

830


What is data _null_?

931


Which command is used to perform sorting in sas program?

837


Give e an example of..

2143


explain the use of % includes a statement in sas? : Sas-administrator

803


Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com

1841


Describe the ways in which you can create macro variables?

889