Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I bind variables to dynamic SQL?
have a look at my web-site; one item describes binding variables in PL/SQL blocks using dbms_sql, another item (for users of oracle 8) describes using object types to pass a list of values as a single parameter.
You SQL then does:
where colX in (cast varray bind variable into subquery) or
where colX not in (cast varray bind variable into subquery)
--
Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
dperez_at_juno_nospam.com wrote in message
<37cf22b7.3496227_at_news.uswest.net>...
>Um, Thomas, I think you may have missed the most important point in my
original
>post:
>
> The string of comma-delimited integers MUST remain intact.
> Parsing it, and creating a varying number of
> predicates would NOT solve the problem.
>
>
>Parsing the values and retrieiving them one at a time works fine... Been
there,
>done that.......... BUT, in the actual program there are ACTUALLY TWO
>QUERIES...........
>
>1: select *... WHERE ... IN (set...)
>
>2: select *... WHERE ... NOT IN (set...)
>
>Parsing the string into some unknown series of individual values then
putting
>each in the select statement would seem not to work well when doing a "not
>in"....... Thus, the reason for the original statement "THE STRING OF
>COMMA-DELIMITED INTEGERS MUST REMAIN INTACT."
>
>I'll give the instr a shot. It may have such serious performance
implications
>its not usable, but its worth a shot.
>
Received on Mon Sep 06 1999 - 05:52:00 CDT
![]() |
![]() |