I find that this solves the problem very nicely,
if exists(select * from Table where key = 'rowId1')
begin
update Table set datavalue = 'newValue', datavalue1 = 'newValue' where key = 'rowId1'
end
else
begin
insert into Table values ('newValue','newValue', etc, etc)
end
Simple and sweet.
No comments:
Post a Comment