update and insert [message #220] |
Tue, 29 January 2002 08:50  |
Ildar
Messages: 3 Registered: January 2002
|
Junior Member |
|
|
Is it possible to create a SQL operator performing the following ?:
1. UPDATE of the row
2. if the UPDATE was failed because of row absence then INSERT with the same params ?
Thanks in advance,
Ildar.
|
|
|
Re: update and insert [message #222 is a reply to message #220] |
Tue, 29 January 2002 14:11  |
Raj
Messages: 411 Registered: November 1998
|
Senior Member |
|
|
cursor c1 is
select column from table where condition;
open c1;
fetch c1 into cur;
if cur%found then
update stetement;
else
insert statement;
end if;
|
|
|