![]() |
|
Archives of the TeradataForumMessage Posted: Thu, 03 Mar 2005 @ 11:14:56 GMT
Yes the insert/Select will not work since it is considered as a complex upsert statement since there are restrictions on what can be used with the upsert syntax. Here is an alternative using bteq's .IF construct.
update t1 set b =2 where a=1;
.if activitycount=0 then goto ins_sel_label
sel * from t1;
.quit
.label ins_sel_label
ins t1 sel 1,1;
sel * from t1;
Narayan
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||