una ayudita por favor...
mi base de datos es oracle 11g
tabla: m_properins
mi trigger tiene la siguiente estructura:
Cita:
Gracias. CREATE OR REPLACE TRIGGER TRG_M_PROPERINS_INSERT
BEFORE INSERT
ON M_PROPERINS FOR EACH ROW
DECLARE
LS_PC_NOM VARCHAR2(30);
LS_PC_IP VARCHAR2(30);
BEGIN
--//------------------------
SELECT sys_context('USERENV', 'IP_ADDRESS') INTO LS_PC_IP FROM DUAL;
SELECT sys_context('USERENV', 'TERMINAL') INTO LS_PC_NOM FROM DUAL;
--SELECT sys_context('USERENV', 'HOST') from dual;
--//------------------------
:NEW.C_AUD_PC := LS_PC_NOM;
:NEW.N_AUD_IP := LS_PC_IP;
END;
/
BEFORE INSERT
ON M_PROPERINS FOR EACH ROW
DECLARE
LS_PC_NOM VARCHAR2(30);
LS_PC_IP VARCHAR2(30);
BEGIN
--//------------------------
SELECT sys_context('USERENV', 'IP_ADDRESS') INTO LS_PC_IP FROM DUAL;
SELECT sys_context('USERENV', 'TERMINAL') INTO LS_PC_NOM FROM DUAL;
--SELECT sys_context('USERENV', 'HOST') from dual;
--//------------------------
:NEW.C_AUD_PC := LS_PC_NOM;
:NEW.N_AUD_IP := LS_PC_IP;
END;
/