From: greg6363 on 3 May 2010 20:59 I'm creating a new dataset and I have a list of 500 account numbers that are in numeric form since I will have to join them to another table. I want to use these 500 account numbers in a where statement but I keep getting an error when I separate the account numbers with a comma. When I use an or operator to separate each account number, it pulls the entire table I am querying against. What am I doing wrong? Any assistance would be greatly appreciated. Thanks.
From: Barry Schwarz on 3 May 2010 23:08 Show your code so we can see what you are doing. On Mon, 3 May 2010 17:59:17 -0700 (PDT), greg6363 <gregtlaughlin(a)gmail.com> wrote: >I'm creating a new dataset and I have a list of 500 account numbers >that are in numeric form since I will have to join them to another >table. I want to use these 500 account numbers in a where statement >but I keep getting an error when I separate the account numbers with a >comma. When I use an or operator to separate each account number, it >pulls the entire table I am querying against. What am I doing wrong? >Any assistance would be greatly appreciated. Thanks. -- Remove del for email
From: greg6363 on 3 May 2010 23:14 On May 3, 11:08 pm, Barry Schwarz <schwa...(a)dqel.com> wrote: > Show your code so we can see what you are doing. > > On Mon, 3 May 2010 17:59:17 -0700 (PDT), greg6363 > > <gregtlaugh...(a)gmail.com> wrote: > >I'm creating a new dataset and I have a list of 500 account numbers > >that are in numeric form since I will have to join them to another > >table. I want to use these 500 account numbers in a where statement > >but I keep getting an error when I separate the account numbers with a > >comma. When I use an or operator to separate each account number, it > >pulls the entire table I am querying against. What am I doing wrong? > >Any assistance would be greatly appreciated. Thanks. > > -- > Remove del for email data perf_final; set perf; where AccountNumber=######## or ######## or ######## or ....................; run;
From: Arthur Tabachneck on 4 May 2010 00:01 Greg, Try: data want; set sashelp.class; where age in (14,15); run; HTH, Art -------------- On May 3, 11:14 pm, greg6363 <gregtlaugh...(a)gmail.com> wrote: > On May 3, 11:08 pm, Barry Schwarz <schwa...(a)dqel.com> wrote: > > > Show your code so we can see what you are doing. > > > On Mon, 3 May 2010 17:59:17 -0700 (PDT), greg6363 > > > <gregtlaugh...(a)gmail.com> wrote: > > >I'm creating a new dataset and I have a list of 500 account numbers > > >that are in numeric form since I will have to join them to another > > >table. I want to use these 500 account numbers in a where statement > > >but I keep getting an error when I separate the account numbers with a > > >comma. When I use an or operator to separate each account number, it > > >pulls the entire table I am querying against. What am I doing wrong? > > >Any assistance would be greatly appreciated. Thanks. > > > -- > > Remove del for email > > data perf_final; > set perf; > where AccountNumber=######## or ######## > or ######## or ....................; > run;
From: Raj on 4 May 2010 04:51
On May 4, 6:01 am, Arthur Tabachneck <art...(a)netscape.net> wrote: > Greg, > > Try: > > data want; > set sashelp.class; > where age in (14,15); > run; > > HTH, > Art > -------------- > On May 3, 11:14 pm, greg6363 <gregtlaugh...(a)gmail.com> wrote: > > > > > On May 3, 11:08 pm, Barry Schwarz <schwa...(a)dqel.com> wrote: > > > > Show your code so we can see what you are doing. > > > > On Mon, 3 May 2010 17:59:17 -0700 (PDT), greg6363 > > > > <gregtlaugh...(a)gmail.com> wrote: > > > >I'm creating a new dataset and I have a list of 500 account numbers > > > >that are in numeric form since I will have to join them to another > > > >table. I want to use these 500 account numbers in a where statement > > > >but I keep getting an error when I separate the account numbers with a > > > >comma. When I use an or operator to separate each account number, it > > > >pulls the entire table I am querying against. What am I doing wrong? > > > >Any assistance would be greatly appreciated. Thanks. > > > > -- > > > Remove del for email > > > data perf_final; > > set perf; > > where AccountNumber=######## or ######## > > or ######## or ....................; > > run;- Hide quoted text - > > - Show quoted text - Hey Art, What happens with where age in (14,15);?? Regards, Raj |