![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Call sqlplus in the shell script | beaniebear | Shell Programming and Scripting | 3 | 05-13-2008 10:30 AM |
| help me in sending parameters from sqlplus script to unix shell script | Hara | Shell Programming and Scripting | 2 | 01-29-2008 03:31 PM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 04:06 AM |
| Shell Script And SQLPLUS | maco_home | UNIX for Dummies Questions & Answers | 6 | 08-25-2007 01:05 PM |
| running shell script from sqlplus | dkr123 | Shell Programming and Scripting | 9 | 07-20-2006 11:52 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
hello all,
I am new to shell scripting and to unix... so the following is my assignment.. here i am trying to insert a values into sqlplus database using shell script. the following is my shell script InsertDelete.sh #! /bin/sh echo "*********The MENU******** 1.Insert The Values Into DataBase 2.Delete The Values From DataBase Enter Your Option:" read choice case "$choice" in 1)echo "The Insert Operation" echo "Enter the Name" read name echo "Enter the age" read age sqlplus scott/tiger @secondScript.sql;; 2)echo "The Delete Operation";; *)echo "Invalid Operation";; esac and this is my secondScript.sql DEFINE name=$name DEFINE age=$age SPOOL secondScript.lst SET LINESIZE 100 SET PAGESIZE 50 INSERT INTO PRADEEP_DATA (name,age) VALUES ('&name','&age'); commit SPOOL OFF The Problem is the values of name and age, is not passing to the .sql file ? and when i check the database, instead of values for name and age $name and $age is inserting into the database!! can anyone help me in this regard... ? thanks in advance !!! |
| Bookmarks |
| Tags |
| passing variables to sqlplus |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|