Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Bind variables in trigger
Hola,
Tengo un problema con una sentencia dinámica en un trigger.
Necesito usar los registros :new y :old en una sentencia dinámica y Oracle
los trata como si fueran bind variables. Se utiliza esta sentencia en una
auditoría
parametrizable de columnas de tablas.
Hi,
I have a problem with a dynamic sentence in a trigger.
I need to use the :new and :old pseudo-records in a dynamic sentence but
Oracle
manages this ones like bind variables.
This process is used for audit changes in table columns pre-defined by user
in
configuration options.
Help me, please.
NEW as new_reg
FOR EACH ROW
.
.
.
/* Column in process: */
ls_CurrCol := ...; -- retrieved from a Cursor of current table updateable
columns
.
.
.
ls_SQL := 'INSERT INTO A_AUDITS
(col1, col2, col_auditing, old_value, new_value) VALUES (' ;
ls_SQL := ls_SQL || ':data1, ''YYY'', ''' || ls_CurrCol ; ls_SQL := ls_SQL || ''', :old_reg.' || ls_CurrCol || ', :new_reg.' || ls_CurrCol || ')' ;
HelppppppppppppppppReceived on Thu Jun 24 1999 - 06:10:29 CDT
![]() |
![]() |