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

What are the parameters of scan function?

1162


What are the difficulties u faced while doing vital signs table or dataset?

2380


Difference between informat and format?

1083


Mention what is the difference between nodupkey and nodup options?

1004


What are the ways in which macro variables can be created in sas programming?

1095


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

1183


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

1132


How to include or exclude specific variables in a data set?

1108


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

1070


What is the role of sas grid administrator? : sas-grid-administration

1281


Differences between where and if statement?

1077


What do the SAS log messages "numeric values have been converted to character" mean?

1369


how are numeric and character missing values represented internally? : Sas programming

1134


What is PDV?

1140


Name any two sas spawners? : sas-grid-administration

1035