View Single Post

   
  #2 (permalink)  
Old 02-24-2008, 06:08 AM
Sybrand Bakker
 
Posts: n/a
Default Re: help on a generic get_nextval function?

On 21 Jul 2004 13:36:58 -0700, jared@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 DBA
Reply With Quote