Hello,
I have code shown below and want to send it to MS SQL server via DBEXEC. How can this be done?
[snippet=]
begin tran
if exists (select * from table with (updlock,serializable) where key = @key)
begin
update table set ...
where key = @key
end
else
begin
insert into table (key, ...)
values (@key, ...)
end
commit tran
[/snippet]
Thanks in advance,
Bob