after running insert or update query, need the last inserted record and compare in vb.net sql server

Posted by ereffe on Stack Overflow See other posts from Stack Overflow or by ereffe
Published on 2010-03-11T18:42:50Z Indexed on 2010/03/11 18:44 UTC
Read the original article Hit count: 191

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about insert

Related posts about update