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 529 of 2,288   
   Jim Kennedy to Lisa S.   
   Re: Problems with "IN"   
   16 Oct 03 01:45:26   
   
   From: kennedy-down_with_spammers@no_spam.comcast.net   
      
   "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   
      
   --- 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