473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help Required: To run the attached UNIX script

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;
Jan 9 '07 #1
0 1127

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: mcp6453 | last post by:
I am trying to use Jack's FormMail script (http://www.dtheatre.com/scripts/formmail). Since I'm brand new at PHP and not very good at HTML, I have an easy question, which I will narrow down. When...
3
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then...
2
by: ASallade | last post by:
Hello, I've scoured my books and the web, but am still daunted, hopefully some of the users in this newsgroup will have advice for my problem. I am not an experienced javascript programmer,...
14
by: Brandon Hoppe | last post by:
I'm trying to change the src of an ilayer in the parent document from a link inside the ilayer. I'm not able to get it to work. All that happens is Netscape 4 crashes. This is for Netscape 4 only....
7
by: mike | last post by:
Hello, I am kind of new to this javascript stuff and I am constantly having problems trying to get my webpage validated. I have the following <script>printdate();</script> and when I validate it...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: hzgt9b | last post by:
I've written a simple javascript page that parses an XML file... (Actually I just modified the "Parsing an XML File" sample from http://www.w3schools.com/dom/dom_parser.asp) The page works great...
6
by: shrutikhungar | last post by:
Am getting this "SP2-0734:: not found" error while runnning following script. Please help. echo "Enter the CUSTOMER ID, CUSTOMER NAME AND FM/CH:" read cust_id; read cust_name; read fm_ch; ...
2
by: samsalmanu | last post by:
I'm trying to ftp from a Unix machine to a Windows machine.. I've tried the following #!/bin/sh #set -x USER="user1" PASS="pass1" HOSTNAME="host1"
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.