Hi,
This Script contains update statements and running without error.
But the update result is not getting reflected in the database. i.e may be Script fails to connect to the database.
it would be of great help if you could figure out the problem.
Thanks,
Shruti
Script follows here:
///////////////////////
#!/usr/bin/ksh
echo "************************************************** ************************************************** ";
echo Making a customer hold or Block
echo "****************************************** ************************************************** *******";
echo "Enter the product name, customer name and the functionality [HOLD(HD)/ BLOCK (BK)]:"
read prod_name;
read cust_name;
read block_hold;
echo $block_hold;
if [[ block_hold = "BK" ]]; then
echo "Block";
`sqlplus -s itm_odb/itm_odb<<EOF
update CUST_PROD_TBL set BLOCKED_STATUS = 'Y' where prod_id = (select prod_id from products_tbl where product_name ='$prod_name') and cust_id = (select cust_id from CUSTOMER_tbl where CUST_name ='$cust_name');
exit;
EOF
`
echo "Block update successfull";
fi
if [[ block_hold = "HD" ]];
then
echo "Hold";
`sqlplus -s itm_odb/itm_odb<<EOF
UPDATE customer_view SET site_id = 'XXX' WHERE site_id = '$cust_name';
exit;
EOF
`
echo "HOLD update successfull";
fi
exit;