How to Dynamically Pass Parameter to plsql Function & Capture its Output Value in a Shell Variable?
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
2. Relevant commands, code, scripts, algorithms:
When I am passing like this function it is not working.
when I am passing like above like i am hardcoding the paramter in function the plsql function is working .
Please let me know how to pass the parameter dynamically to plssql function as well at the same time capture the output value in a shell variable 3. The attempts at a solution (include all code and scripts):
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Oracle India, Bangalore,India
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by sujitdas2104; 08-08-2017 at 10:00 AM..
Reason: Added CODE tags.
Suppose I have a unix variable called RGNM which is holding a value. Now I want to call a plsql function in my script. THis plsql function takes one IN parameter. I want to pass my UNIX VARIABLE Value to the plsql function. Can i just give it by giving $RGNM in the function after calling sqlplus... (1 Reply)
Hi there!
I'm trying to write a script that will capture output from a command and assign it to a variable.
Let's say, for example, I'd like to catch from inside the script whatever the following command outputs:
ls *.aaa
and put it into a variable "listoffiles".
What I tried was:
set... (3 Replies)
HI all
I have a code like
##############################################
minyear()
{
curryear=$1
echo $curryear
}
##Main Program ##
minyear
exit
#######
when i execute "sh scriptname 2005" output should be like 2005 but the output is blank.
I guess i need to pass parameter to... (3 Replies)
I need to pass a variable as a parameter from shell script into a DB2 database.
var=bhuk_1123_Q_11/22/09
select * from tbl1 where serial_id='$var';
I have tried executing it using
db2 -tvf scriptname
Somebody please help me out with this. It is throwing an error. Please tell me how... (2 Replies)
Hello,
Can anyone guide me tin passing parameters into user defined function of shell script (KSH).
Here is my code,
InsertRecord()
{
DB_TBL=$(sqlplus $USERID/$PASSWORD@$DATABASE << EOF
set head off
set feed off
set serveroutput on
INSERT INTO TBL1 ( OLD_VAL,
NEW_VAL,
... (7 Replies)
Hello again :)
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
... (2 Replies)
Hello,
I am trying to execute an SQL query from shell script.
A part of script is something like this:
fromDate=`echo $(date +"%F%T") | sed "s/-//g" | sed "s/://g"`
$ORACLE_HOME/sqlplus -s /nolog <<EOD1
connect $COSDBUID/$COSDBPWD@$COSDBSID
spool... (4 Replies)
Hi Gurus,
I have request which needs to pass position parameter to a function. I tried below simple code, it doesn't work.
#!/bin/bash
func_1(){
echo $1
}
func_1
$ ./set_file abc
$
do I need add some to get the position para first?
thanks in advance. (3 Replies)
Discussion started by: ken6503
3 Replies
LEARN ABOUT DEBIAN
redi
redi(3) Library Functions Manual redi(3)NAME
redi -
All PStreams classes are declared in namespace redi.
SYNOPSIS
Classes
struct pstreams
Common base class providing constants and typenames.
class basic_pstreambuf
Class template for stream buffer.
class pstream_common
Class template for common base class.
class basic_ipstream
Class template for Input PStreams.
class basic_opstream
Class template for Output PStreams.
class basic_pstream
Class template for Bidirectional PStreams.
class basic_rpstream
template for Restricted PStreams.
Typedefs
typedef basic_pstreambuf< char > pstreambuf
Type definition for common template specialisation.
typedef basic_ipstream< char > ipstream
Type definition for common template specialisation.
typedef basic_opstream< char > opstream
Type definition for common template specialisation.
typedef basic_pstream< char > pstream
Type definition for common template specialisation.
typedef basic_rpstream< char > rpstream
Type definition for common template specialisation.
Detailed Description
All PStreams classes are declared in namespace redi.
Like the standard iostreams, PStreams is a set of class templates, taking a character type and traits type. As with the standard streams
they are most likely to be used with char and the default traits type, so typedefs for this most common case are provided.
The pstream_common class template is not intended to be used directly, it is used internally to provide the common functionality for the
other stream classes.
Author
Generated automatically by Doxygen for PStreams from the source code.
PStreams Thu Nov 10 2011 redi(3)