As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tips:Where also"

From sasCommunity
Jump to: navigation, search
(add wikilinks)
(add article migrated text)
 
Line 1: Line 1:
 +
{{Template:Article_Migrated|https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-where-also/m-p/442603}}
 
You can use an '''ALSO''' operator in a '''WHERE''' [[statement]] (or [[function]]). Use a series of '''WHERE''' statements instead of a single statement. The ''condition clauses'' are combined  as if you wrote a single '''WHERE''' statement with the ''condition clauses'' '''AND'''ed together. For example,
 
You can use an '''ALSO''' operator in a '''WHERE''' [[statement]] (or [[function]]). Use a series of '''WHERE''' statements instead of a single statement. The ''condition clauses'' are combined  as if you wrote a single '''WHERE''' statement with the ''condition clauses'' '''AND'''ed together. For example,
 
<source lang="sas">
 
<source lang="sas">

Latest revision as of 14:33, 18 July 2018


As part of the decommissioning effort for sasCommunity.org this article/tip has been migrated to communities.sas.com.

The new home for this article/tip is Where also (https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-where-also/m-p/442603)



You can use an ALSO operator in a WHERE statement (or function). Use a series of WHERE statements instead of a single statement. The condition clauses are combined as if you wrote a single WHERE statement with the condition clauses ANDed together. For example,

proc print data = sashelp.class;
 Title 'Teenage Boys';
 where Sex = 'M';
 where also Age > 12;
run;

produces the same output that the following WHERE statement would.

where Sex = 'M' and Age > 12;
Submitted By Don Henderson

....read more