Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
-
The problem statement, all variables and given/known data:
-
Relevant commands, code, scripts, algorithms:
#! /bin/ksh
v="ORG_ID"
get_next_xfer_id ()
{
NEXT_ID=$(sqlplus -s $1 <<\!
set pages 0 feed off
select bolinf.brok_fndload_pkg.brok_fndload_profile_chk('$2')
from dual;
!
)
}
get_next_xfer_id $1 $v
echo $NEXT_ID
When I am passing like this function it is not working.
#! /bin/ksh
get_next_xfer_id ()
{
NEXT_ID=$(sqlplus -s $1 <<\!
set pages 0 feed off
select bolinf.brok_fndload_pkg.brok_fndload_profile_chk('ORG_ID')
from dual;
!
)
}
get_next_xfer_id $1
echo $NEXT_ID
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):
- 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