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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Prepared statement within a stored procedure loop

Re: Prepared statement within a stored procedure loop

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Sun, 13 Jun 1999 01:43:38 +0100
Message-ID: <3eY$FpA66vY3EwTQ@ahardy.demon.co.uk>


In article <7js67s$ssl$1_at_nnrp1.deja.com>, mozkill_at_my-deja.com writes
>Does anyone have a rough idea of what the syntax for a prepared
>statement would be inside a loop of a stored procedure.
>
>Example:
>
>while x < 10
> preparedStatement = "SELECT label" + x + " FROM field" + x + " WHERE
>item = "somestring"
>execute(preparedstatement)
>end loop
>
>i realize the syntax above is all screwed up.

It looks like you should be looking and the DBMS_SQL package in order to create dynamic SQL.

Andy
> any help would be
>appreciated, or a GOOD url. notice how the table and field element
>dynamically change according to the value of "x"
>
>send a carbon copy of your reply to jonx.williams_at_intel.com
>
>thanks a bunch
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

--
Andy Hardy. PGP key available on request


Received on Sat Jun 12 1999 - 19:43:38 CDT

Original text of this message

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