I have been reading up on triggers and I am still unclear as to the
best way to accomplish the following:
Each row in table A has an account number field. After insert of record
1 into table A, if the value of the acccount number exists in table B,
I need to update that corresponding record in table B, otherwise I need
to insert the record into table B. I know that I need an insert
trigger, so that after each insert into table A, an event is triggered.
What I am unsure about is what type of logic is actually allowed in a
trigger. How would I accomplish the checking to see if the record
exists in table B, if so do an update, otherwise do an insert? What is
tbe best way, in a trigger, to tell if a record with this account
number exists in table B. Thanks.