Re: Execute immediate in forms6 not recognized?
Date: Tue, 11 Jun 2002 19:31:11 GMT
Message-ID: <3D064FFA.D027078B_at_exesolutions.com>
ram wrote:
> I am trying a dynamic PL/SQL to get a single value from a table where
> the name of the table and the column to query are determined at
> runtime. If I try
>
> EXECUTE IMMEDIATE 'SELECT '||v_lookupf||' FROM '||v_lookup||' WHERE
> '||. . . etc.
>
> in any procedure or function (even by itself) I get
>
> Encountered the symbol IMMEDIATE when expecting one of the following
> . . .etc.
>
> Not understanding why this was happening I tried the old method of
> EXEC_SQL.OPEN_CURSOR etc. and got 4 errors, then DBMS_SQL.OPEN_CURSOR
> etc. and got 5 errors, so I think I try to fix the single error in
> execute immediate. Any suggestions?
Hard code the string initially and then replace the hard-coded values and replace them, one at a time, with bind variables. Use the USING clause with your NDS.
Daniel Morgan Received on Tue Jun 11 2002 - 21:31:11 CEST