Quote:
Originally Posted by Rob137
How about this:
[sql]
if (exists (select * from AA_TestTable as t1
where t1.ord_num = 'FFF'))
begin
update AA_TestTable
set ord_qty = 999
where ord_num = 'FFF'
end
else
begin
insert into AA_TestTable (ord_num, top_assy, ord_qty)
values('GGG', 'XYZ', 567)
end
[/sql]
|
This opption worked wonders! Thanks for posting