Hi Guys,
I have a script which is inserting records in the table. The insert query has 0 rows to be inserted. because of that a warning is being thrown. But the return code of the insert query is showing as 1.
Is it like when a warning comes, the return code will be 1?
However, the same script is running fine with different family codes even though it is having 0 rows to be updated.
can u people help me out with this..
I am pasting the part of the code causing problem....
db2 "insert into table \
(col,,,,\
) \
select * from tab1 a, tab2 b where\
a.id=b.id \
with ur"
STAGESUM_RC=`echo $?`
if [[ $STAGESUM_RC != "0" ]] ; then
ReturntoParent $STAGESUM_RC "Error in Insert Fact Stage_Sum"
fi
db2 "commit"
In the log i can see the insert statement is executed and the warning is appearing but after that, the return code is 1 which is terminating the script..
Thanks for ur help in advance,
Magesh