home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 535 of 2,288   
   Jim Kennedy to Lisa S.   
   Re: Problems with "IN"   
   16 Oct 03 14:17:35   
   
   From: kennedy-downwithspammersfamily@attbi.net   
      
   "Lisa S."  wrote in message   
   news:ba0b4810.0310160441.71768833@posting.google.com...   
   > "Jim Kennedy"  wrote in   
   message news:...   
   > > "Lisa S."  wrote in message   
   > > news:ba0b4810.0310150916.67bf42e9@posting.google.com...   
   > > > Can someeone help! This works:   
   > > >   
   > > > SELECT * FROM sometable   
   > > > WHERE 1 IN (1, 2, 3) ;   
   > > >   
   > > > But if I want something like this:   
   > > >   
   > > > s_mylist   VARCHAR2(20) := '1, 2, 3';   
   > > >   
   > > > SELECT * FROM sometable   
   > > > WHERE 1 IN ( s_mylist ) ;   
   > > >   
   > > > It doesn't work. Can't I do this?   
   > > >   
   > > > Thanks   
   > > > Lisa   
   > >   
   > > It does not work because s_mylist is one thing the string '1, 2, 3'   
   instead   
   > > of   
   > > where 1 in (1,2,3)   
   > > Also you are comparing numbers and strings - not good.  compare numbers   
   and   
   > > numbers.   
   > > Jim   
   >   
   > Hi Jim   
   >   
   > Sorry, I guess I wasn't clear - What we are trying to do is to format   
   > a string with the 'IN' items to check elsewhere and pass it into the   
   > stored procedure. I guess my question is - can't I use a variable with   
   > the 'IN' Operator ?   
   > Thanks   
   > Lisa   
   Not that way.  go to asktom.oracle.com and do a search.  You will find   
   something there that will help you.   
   Jim   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca