Thread: problem in Trigger

problem in Trigger

From
"Ramesh PAtel "
Date:
Sir


I have two table  EMP_MST and  EMP_TRANS

field of EMP_MST
emp_no, emp_nm, dept_cd

field of EMP_TRANS
emp_no, trans_dt, olddept_cd, newdept_cd


Now i want to Trigger on EMP_TRANS when  data INSERT  AFTER event
when insert one row in EMP_TRANS  table that time i want to UPDATE  column
EMP_MST.dept_cd   with latest value of  EMP_TRANS.newdept_cd  by TRIGGER.

Please give some reply.

I am looking forwared to your fevarable reply.

Ramesh Patel

ramesh@banas.guj.nic.in


Re: problem in Trigger

From
"A.Bhuvaneswaran"
Date:
> Now i want to Trigger on EMP_TRANS when  data INSERT  AFTER event
> when insert one row in EMP_TRANS  table that time i want to UPDATE  column
> EMP_MST.dept_cd   with latest value of  EMP_TRANS.newdept_cd  by TRIGGER.

Follow the below link to learn howto write triggered procedures:

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=plpgsql-trigger.html

Donot post the same message with different subject in different mailing
list.

regards,
bhuvaneswaran