while [ 1 ]
do
echo "Select number from the following options"
echo "1 - Data Base Menu
2 - Customer Sale
3 - Quit"
read opt
case $opt in
"1")
managementMenu
;;
"2") echo " Enter Sale Code"
read eCode
echo " Enter client Code: "
read cCode
echo " Enter product "
read product
echo " Enter Quantity "
read QTY
db2 "update Sales set QTY = $QTY where SNR = '$eCode' and PNR = '$product'"
**db2 "update Histroy set QTY = $QTY where CCN = '$cCode' and PNR = '$product'"**
;;
"3")
break
;;
*) echo invalid option;;
esac
done
# cant use select * to display
答案 0 :(得分:2)
而不是执行
db2 "update Sales set ...
尝试使用
db2 -v "update Sales set ...
这将导致DB2 CLP回显它正在获取的实际SQL语句,这可能会显示导致错误的原因。 (即@ p.s.w.g建议)