Postgres Trigger help!!!

Hey all :) ,

Just wondering if the following trigger is possible - and if so how would it be written?

I need to write an insert trigger on a table (lets says tbl1) that will insert data into another table- tbl2.

The data that will be inserted into tbl2 will include data from tbl1 (lets say colA of the newly inserted row) as well as from another table - tbl3.

The data that will need to be extracted from tbl3 and thus inserted into tbl2 includes all those rows which match colA of tbl1. So there could be more than one row that needs to be inserted into tbl2.

Hope this is making some sense so far :confused: ...

How would one go about writing such a trigger - if it is possible?

Any hints, tips, advice will be very much appreciated!

Many thanks in advance,

e.

[825 byte] By [elijaha] at [2007-10-3 4:12:27]
# 1
No worries - sorted!!!Pretty simple really! - Just require a few cursors - duh!
elijaha at 2007-7-14 22:13:12 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...