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 the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi

541


Explain substr function?

566


Enlist the syntax rules followed in sas statements.

602


How would you define the end of a macro? : sas-macro

595


how can you create zero observation dataset? : Sas programming

625






For what purposes have you used sas macros? : sas-macro

531


Why double trailing @@ is used in input statement?

686


what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming

599


Differentiate between ceil and floor functions.

648


Which command is used to perform sorting in sas program?

587


i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm

1834


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1086


What are the different types of sas functions?

601


what is the one statement to set the criteria of data that can be coded in any step? : Sas programming

641


Give some ways by which you can define the variables to produce the summary report (using proc report)?

587