Toad World® Forums

Trigger on update and select and insert into ztable


#1

Hi ,

I have posted my query but for some reason this errors out

CREATE TRIGGER z_LOGIN2 AFTER UPDATE OF lastsignondttm ON SYSADM.PSOPRDEFN
FOR EACH ROW

BEGIN
IF INSERTING THEN
SELECT DISTINCT a.oprid, a.oprdefndesc, a.lastsignondttm, b.rolename
from SYSADM.psoprdefn a, SYSADM.psroleuser b
where a.oprid=b.roleuser
and (rolename = ‘FAS Change Admin’ or b.rolename=‘PeopleSoft Administrator’)

INSERT INTO SYSADM.PS_FZAP_AUDIT_LOGS VALUES (a.oprid,a.oprdefndesc,a.lastsignondttm,‘test’,‘FS9DEVP’,user,sysdate);


#2

Hello,

please let me know which error you got ,any screenshot or error message?