Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help on a generic get_nextval function?
On 21 Jul 2004 13:36:58 -0700, jared_at_hwai.com (Jared) wrote:
>Am I going to have to construct a string using DBMS_SQL? I was hoping
>there was an easier way.
You have a variable sql statement. You are using static sql. Consequently this is not going to work and you need dbms_sql or better execute immediate (8i and higher)
However, you'll now will incur a hard or soft parse for every invocation of the function. You are trying to save a few keystrokes by introducing a sledgehammer in your application.
-- Sybrand Bakker, Senior Oracle DBAReceived on Wed Jul 21 2004 - 16:17:02 CDT