Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger - After Update Column - Return values of affected row

user13283765Jul 11 2011 — edited Jul 11 2011
Hello All,

I'm trying to figure out how to get back values in the affected row(1) and update columns in that row for an UPDATE ON COLUMN OF TABLE trigger.

Here is my table(affected) structure:
 "LOG_ID"       NUMBER NOT NULL ENABLE,
 "LOG_ASSIGNEE_ID"          VARCHAR2(100 BYTE) NOT NULL ENABLE,
 "LOG_USERNAME" VARCHAR2(10 BYTE) NOT NULL ENABLE
Here is what I need to do after the ASSIGNEE_ID is updated in my main table (trigger table)
}
CREATE TRIGGER "JSNOTIONS"."OIMGM_ASSIGNEE_T1"

AFTER UPDATE OF assignee_id ON oimgm
BEGIN

   -- UPDATE SECOND_TABLE_LOG SET LOG_USERNAME = (SELECT FNAME || LNAME FROM USERS WHERE USER_ID = *affected row* LOG_ASSIGNEE_ID);

END;
In short, I'm trying to GET the single affected row and perform additional DML mainupulations on a that single affected row as well as other table.

Thanks in advance for any assistance.

/Ja
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2011
Added on Jul 11 2011
3 comments
212 views