views:

26

answers:

1

i have 2 queries in vb.net with an if clause - if x=0 then insert into table1 else update table1

both queries have 5 fields. now what i want to do is after this insert or update takes place, i need to look at this inserted/updated record and compare it with another table (table2). Especially for update, i have 5 fields in both tables. if any of the 5 fields dont match with table2, then i insert a new record in table 2 which is the updated record in table 1. how can i do this?

A: 

You could use a trigger and keep this all on the database.

Joel Coehoorn