delete and insert in one transaction
Posted: Mon May 21, 2001 5:32 pm
Hello you all,
New becomer to this mailing-list, thanks to the Ascential Support Team ;o), id like to submit to you a "simple" request : "Is it possible to make a selective deletion, then an insertion, in an only transaction" (these last words are truly important).
For example, if the rows to insert are
FIELD_1 FIELD_2 FIELD_3
AA AA AA
AA BB BB
AA CC CC
(very nasty)
wed like to perform the two statements :
delete from table
where FIELD_1 like AA ;
insert into table
values (?, ?, ?) ;
with a general rollback if any of both fails.
Uh, i think you have it. Were using DataStage 4.0, dealing with Oracle 8 bases (using the DataStage OCI 8.0, or ODBC stages as well)...
Lets see if you have a clue (the answer will do the trick too ;o)
--
Aurelien
New becomer to this mailing-list, thanks to the Ascential Support Team ;o), id like to submit to you a "simple" request : "Is it possible to make a selective deletion, then an insertion, in an only transaction" (these last words are truly important).
For example, if the rows to insert are
FIELD_1 FIELD_2 FIELD_3
AA AA AA
AA BB BB
AA CC CC
(very nasty)
wed like to perform the two statements :
delete from table
where FIELD_1 like AA ;
insert into table
values (?, ?, ?) ;
with a general rollback if any of both fails.
Uh, i think you have it. Were using DataStage 4.0, dealing with Oracle 8 bases (using the DataStage OCI 8.0, or ODBC stages as well)...
Lets see if you have a clue (the answer will do the trick too ;o)
--
Aurelien