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 is the basic structure of the SAS base program?

692


how do the in= variables improve the capability of a merge? : Sas programming

937


How many data types are there in SAS?

637


how sas deals with business intelligence? : Sas-bi

586


How do you control the number of observations and/or variables read or written?

752






what is sas database server? : Sas-di

619


how can you create zero observation dataset? : Sas programming

644


What are the prime responsibilities of data integration administrator? : Sas-di

591


What are the features of SAS?

582


what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?

1689


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

653


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

1846


What is your favorite all time computer book? Why?

2050


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

1668


Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?

1772