You could use BT/ET, but it's better to do it within a "multistatement request", in a BTEQ script it's:
insert into target select * from source
;delete from source;
The multistatement is caused by the position of the first semicolon: if there's a new statement starting on the same line after the semicolon both statements are sent to TD as one block.
In a SP it's BEGIN REQUEST .... END REQUEST.
Neccessary locks (write on both tables) are automatically applied.
Dieter
You could use BT/ET, but it's better to do it within a "multistatement request", in a BTEQ script it's:
The multistatement is caused by the position of the first semicolon: if there's a new statement starting on the same line after the semicolon both statements are sent to TD as one block.
In a SP it's BEGIN REQUEST .... END REQUEST.
Neccessary locks (write on both tables) are automatically applied.
Dieter