Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / rauthu

Yes, WHERE and HAVING can be used in single program. HAVING must be after GROUP by clause.
Example:
proc sql;
select make, model, avg(msrp) as avgmsrp, msrp
from sashelp.cars
where make ='Honda'
group by model
having avgmsrp < 100000;
quit;

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give e an example of..

2382


What are the different versions of sas that you have used until now? : sas-grid-administration

1389


explain the key concept of sas? : Sas-administrator

1049


How to specify variables to be processed by the freq procedure?

1117


What do you code to create a macro? : sas-macro

1189


How do you test for missing values?

1690


How to sort in descending order?

1298


What are the special input delimiters used in SAS?

1238


how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming

1072


How to test the debugging in sas?

1243


What is the difference between match merge and one to one merge?

1311


what do the pad and dim functions do? : Sas programming

1072


what are some differences between proc summary and proc means? : Sas programming

1194


how will you locate the sas platform applications? : Sas-bi

1083


what is change analysis in sas di ? : Sas-di

1112