How to call Oracle function with multiple arguments from shell script?
Dear All,
I want to know how can i call oracle function from shell script code . My oracle function have around 5 input parameters and one return value.
I'm getting below error
Please help.
Moderator's Comments:
Please wrap all code, files, input & output/errors in CODE tags.
It makes them far easier to read and preserves multiple spaces for indenting or fixed-width data.
Last edited by rbatte1; 08-26-2016 at 01:13 PM..
Reason: Added CODE tags for output
There are lots of errors - $x should be $name or $name should be $x - everywhere in the script
scoot/tiger should be scott/tiger
All of the red words have issues, were missing or were wrong like using ' around a variable instead of double quotes.
Plus, there just be other lines of code you did not show since there are not 79 lines in the code.
I would guess the actual error the shell found first started somewhere else.
DBMS_OUTPUT is what you should use to debug PL/SQL code - what you are writing, why I enclosed part of the script with - not select something from dual;
Hi jim mcnamara,
Thank you for pointing out the problem in my code. I removed all unnecessary lines as you suggested. Still I'm getting same error. I'm posting my entire shell script code below.
Still I'm getting below error message:
Moderator's Comments:
Please wrap all code, files, input & output/errors in CODE tags.
It makes them far easier to read and preserves multiple spaces for indenting or fixed-width data.
Last edited by rbatte1; 08-30-2016 at 04:43 AM..
Reason: Added CODE tags
I have a script that uses 2 arguments. I want to call the function part within this script using these same arguments. Below is what I came up with below script so far, any guidance would be helpful. Thank you!
cat backup.sh
#!/bin/bash
function usage {
echo "USAGE: $(basename $0)... (6 Replies)
I am converting shell script to Perl. In shell I have a code
parse_prog_args()
{
if
then
while
do
case $1 in
-P* | -p* )
export PROCESS_DATE=$2
export MM=`echo $2 | cut -c5-6`
export DD=`echo $2 | cut -c7-8`
export YY=`echo $2 | cut -c3-4`
export... (4 Replies)
I need to call a function within a code with $database and $ service as the arguments How do I proceed ? and how would a function be defined and these two arguments would be used inside the function?
calc_pref_avail $database $service
Best regards,
Vishal (7 Replies)
Here is the following code :
1.
# gcc -c test firstprog.c
the above command will generate a executable file called "test " in which ever directory it is run.
Assuming It will also return a value.
2. In the below SCRIPT . test is a file generated by compiling a c program... (3 Replies)
Hi everyone!
I'm new with Shell Scripting, and I have to do a shell script to call a procedure, which have 2 input parameters, the directory(from server) and the txt file (which have informations to update/insert in DB).
I have to create a shell script to execute that procedure for each txt... (5 Replies)
Hi,
I have a function in shell script
fun1{ echo "No.of arguments are..."}
this function will be called in same script by passing arguments
fun 1 2 3
I want to check the no. of arguments passed to fun1 function in the same functionbefore validation.
can any one suggest me. (2 Replies)
i have a function written in one shell script and i want to call that function in another shell script and use the value returned by that script.
can any one suggest me how can i do that?
regards,
Rajesh.P (4 Replies)
Hi,
I have two shell variables $t1 and $t2 which I need to pass to a function in a shell script. The function will do some computation with those two variables and echo the resultant. But I do not know how to pass teh arguments.
The function written is
f1()
{......
........
}
What should... (3 Replies)