Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to turn this query to use BOUND variables?

Re: How to turn this query to use BOUND variables?

From: -=< a q u a b u b b l e >=- <aquabubble_at_Remove.No.Parma.Ham.Remove.geocities.com>
Date: Thu, 11 Nov 1999 00:58:19 -0000
Message-ID: <80d4b6$j61$1@news8.svr.pol.co.uk>


<karsten_schmidt8891_at_my-deja.com> wrote in message news:80bh58$ifn$1_at_nnrp1.deja.com...
> Hi,
>
> SELECT * FROM CUSTOMERS WHERE CUSTOMER_ID IN (:b1,:b2,:b3,:b4,:b5,:b6)
>
> parse, bind, execute, fetch.
>
> Note, there is an upper limit on the number of elements in an in list.
> (255, i think)
>
> If you have varying length lists, always have the same statement
> (max number of list elements) and bind the same value multiple times.
> That way you don't use sga for diffeent-looking statements.

You don't have to use dynamic SQL for this. You could have a cursor with a parameter, b1 say, and OPEN, FETCH, CLOSE in a loop for all possible values. Received on Wed Nov 10 1999 - 18:58:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US