| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: A simple newbie question with select
"Tomislav Petrovic" <t.petrovic_at_inet.hr> wrote in message
news:btk1n4$gna$1_at_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]'
![]() |
![]() |