In the sql: where field1 = '&1' and field2 = '&2' and field3 = &3
where parameters 1 and 2 are character and the 3 is numeric.
Regards,
Isa
Quote:> I gather parameter values in a korn shell script and want to use them in a
> sqlplus script that is called from the shell script. How do you pass a
value
> into the sqlplus script?
Quote:> I gather parameter values in a korn shell script and want to use them in a
> sqlplus script that is called from the shell script. How do you pass a
value
> into the sqlplus script?
Those who follow in your footsteps will call upon all known gods to
bless your name for eternity.
Martin
>In the sql: where field1 = '&1' and field2 = '&2' and field3 = &3
>where parameters 1 and 2 are character and the 3 is numeric.
>Regards,
> Isa
>>I gather parameter values in a korn shell script and want to use them in a
>>sqlplus script that is called from the shell script. How do you pass a
>value
>>into the sqlplus script?
or
echo "Enter year \c"
read year
echo "Enter period \c"
read per
echo "$schema/$password
insert into your_table (year, period, created) values ($year,$per,sysdate);
" | sqlplus > /dev/null
Or pass parameters the way the other posters do.
jg
see http://www.orafaq.com for other faqqy stuff.
1. How to pass a variable from a shell script to another shell script...
Hi,
I have written a shell script 1............and internally its
calling another shell script 2........input to redhat specific
chkconfig command... which executes and builds links in bootstartup
scipt directories (rc.d).
Actually i needs to pass a variable $DIRECTORY of my command available
( can hard code but i am
setting it in the 1st script) to the 2nd script how to pass that... As
the setting is happening before the calling of
shell script2, i just tried like putting echo "$DIRECTORY" into the 2nd
shell script, which is not working is there
a way to get the functionality.
shellscript1:
#!/bin/sh
---------
---------
---------
DIRECTORY="/sbin/ntp"
---------
---------
/sbin/chkconfig "shellscript2"
---------
shellscript2:
#!/bin/sh
-------
echo "$DIRECTORY" <------put to see whether getting the value here
or not..
$DIRECTORY -c ntp.conf <------if it is so , i could use like
this.................
thanks,
srinivas.
--
office ph: 091-40-3607619
2. control the stdout of printf
3. Passing a variable between shell script and perl script
4. PLEASE HELP! Micron 15FGx & X
5. Passing a variable from a Perl script to a shell script
7. Accessing a shell script w/o doing . /script
8. IMAP 4 ???
9. handling SIGINT in shell scripts when executing another shell script.
10. Passing values generated in awk/nawk back to script
11. Q: How can I have a shell script call another shell script...
12. Passing Value to Linux Script from CGI
13. Reading a file and passing it as a value to a script.