I need help on a trigger that will update a tables value if the skew number is exists, if not, add it to the table. My information is below, I have tried many triggers, but all without results I am looking for. I just need a little help thinking outside the box.
tbl_inv
skew(nvarchar)
cases(int)
skids(int)
tbl_enter
id(int)
skew(nvarchar)
cases(int)
skids(int)
date(date)
Basically, When a record is inserted into tbl_enter it will fire a trigger that inserts skew(nvarchar),cases(int),skids(int) into tbl_inv. If skew already exists in tbl_inv it will add the inserted data to the current data.if not it will just add it to the table.
tbl_inv
skew(nvarchar)
cases(int)
skids(int)
tbl_enter
id(int)
skew(nvarchar)
cases(int)
skids(int)
date(date)
Basically, When a record is inserted into tbl_enter it will fire a trigger that inserts skew(nvarchar),cases(int),skids(int) into tbl_inv. If skew already exists in tbl_inv it will add the inserted data to the current data.if not it will just add it to the table.