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 933 of 2,288   
   .com to Tomislav Petrovic   
   Re: A simple newbie question with select   
   08 Jan 04 12:03:07   
   
   From: mcstockX@Xenquery   
      
   "Tomislav Petrovic"  wrote in message   
   news:btk1n4$gna$1@garrison.globalnet.hr...   
   | Or in other words:   
   |   
   | How can I write this query inside stored procedure   
   |   
   | SELECT local_id, remote_id FROM SYNCML_MAPS WHERE idn_id = a_db_idn AND   
   |    local_id IN (1, 3, 9, 17, 20001);   
   |   
   | So that (1, 3, 9, 17, 20001) part can be specified as procedure input   
   | parameter???   
   |   
   | Tomy.   
   |   
   |   
      
   try constructing the statement and using EXECUTE IMMEDIATE (probably the   
   preferred method)   
      
   if the predicate on the LOCAL_ID column does not contribute to performance   
   (i.e., plenty of selectivity on the IDN_ID column), you could also try   
   something like   
      
       and instr( v_options, '[' || local_id || ']' ) > 0   
      
   where V_OPTIONS is constructed in the proc to look something like   
   '[1][3][9][17][20001]'   
      
   -- mcs   
      
   --- 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