|Date: ||Thu, 16 Nov 2000 10:47:56 -0800|
|Reply-To: ||Nick Paszty <npaszty@ORGANIC.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Nick Paszty <npaszty@ORGANIC.COM>|
|Subject: ||Re: Question about: var IN(1,2)|
|Content-Type: ||text/plain; charset="us-ascii"; format=flowed|
The in operator as described in the online documentation.
The IN operator, which is a comparison operator, searches for character and
numeric values that are equal to one from a list of values. The list of
values must be in parentheses, with each character value in quotation marks
and separated by either a comma or blank.
For example, suppose you want all sites that are in North Carolina or
Texas. You could specify:
where state = 'NC' or state = 'TX';
However, the easier way would be to use the IN operator, which says you
want any state in the list:
where state in ('NC','TX');
In addition, you can use the NOT logical operator to exclude a list. For
where state not in ('CA', 'TN', 'MA');
At 01:26 PM 11/21/00 -0500, barrere Bendia wrote:
> whene I write
> var IN(1,2)
> does it mean:
>var =1 or var=2 ?
>or this means
>var =1 and var=2 ?
>And what's the difference betwee
>IN(1 2) and IN(1,2)?
>Where can I find documents about those elementary things?
>Thanking you in advance.