passing paramaters to a pl\sql precedure


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting passing paramaters to a pl\sql precedure
# 1  
Old 06-16-2009
passing paramaters to a pl\sql precedure

I have this piece code in a shl, I need to pass paramaters to a PL\SQL
PRECEDURE like $fseqno and faidy I know that the $fseqno works correctly but I am not sure aboyt the faidy
can I code it like that faidy ='0910' ?
Thank you


for i in 3526*.dat
do

# Capture just the file sequence number
fseqno=`print $i | sed 's/.*_//' | sed 's/.dat//' `
faidy ='0910'
cd "${MPATH}/middlebury/dat_files"
echo $i `date` > idochd1.lst
cp $i idoc.dat
# Load file into tables RYRIDOC_COVER, RYRIDOC_IMAGE, RYRIDOC_TAXDATA, RYRIDOC_W2
##cd $SOFTPATH/script
# Change dir to where the sql scripts are
cd ${SCRIPT_PATH}
sqlplus -s ${UID_F}/${PW_F}${SIDQ} ${SQL_SCRIPT1} $fseqno >>${LF1} ${UID_F} 2>>${LF2}
# Process
##cd $SOFTPATH/script
###sqlplus / @$SOFTPATH/script/rypidoc_process2_run.sql
cd ${SCRIPT_PATH}
sqlplus ${UID_F}/${PW_F} ${SQL_SCRIPT2} $faidy >>${LF1} 2>>${LF2}
# 2  
Old 06-17-2009
Quote:
Originally Posted by rechever
...
can I code it like that faidy ='0910' ?
...
Yes, you can.

tyler_durden
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing sql file name as an argument

Hi all, I have a a file which contains an oracle query. If this file is pushed into a shell script such as the below, it of course works fine. #!/usr/bin/sh su - oracle -c 'sqlplus -s / as sysdba <<EOF @/home/cron/ORA/sql/T-ORA006-OracleSessions.sql exit; EOF . What i am after... (2 Replies)
Discussion started by: nms
2 Replies

2. Shell Programming and Scripting

Passing string from SQL to a BASH script

OS Solaris 10, DB oracle 10g Hello, We currently have a BASH script that runs and moves image files from a remote server to the local db server. A snippet of the code shows that we are picking up all Images that are 'mtime -1' some code... for file in `ssh user@10.200.200.10 'find... (3 Replies)
Discussion started by: JonP
3 Replies

3. Shell Programming and Scripting

Passing variable to sql

How to pass variable to sql file. Im tryin in two ways, Method 1: my.sql select * from table where col1 = '$1' and col2 = 'text'; Method 1execute: dbaccess database my.sql $var Method2: select * from table col1 in (`cat inputfile`) and col2 = 'text'; method... (2 Replies)
Discussion started by: Roozo
2 Replies

4. Shell Programming and Scripting

passing arguments to sql script

Hi Gurus, i have one requirement in unix script, i have a file called abc.txt in that few lines are there with the empid, i need to read each line and pass to .sql script. ex: abc.txt 2345 2346 1243 1234 i need to pass these arguments to .sql script rom unix ex: select * from... (1 Reply)
Discussion started by: Devendar
1 Replies

5. Shell Programming and Scripting

Passing argument to a pl/sql block

Hi, How can I pass an argument to a pl/sql block through perl/unix shell scripting. (2 Replies)
Discussion started by: er_ashu
2 Replies

6. Shell Programming and Scripting

Passing argumnets from shell script to sql

hi I all , I have sql statment in my shell script , I pass two argument to the script I need to pass the this two arguments to the sql statment example : runsql.sh "1" "2" sql : updat tables_x set y=0 where A=:x should subsituted by "1" and B=:y shuold subsituted bt "2"... (1 Reply)
Discussion started by: habuzahra
1 Replies

7. UNIX for Advanced & Expert Users

passing value to a variable in a SQL

Hi Folks, This is a small chunk of the bigger problem which i am facing and some help here will help me resolve the rest of the issue. Problem is that i need to pass the value of a variable from a shell script to a SQL query (infact a lot of SQL's) i have the following solution but somehow... (4 Replies)
Discussion started by: kamitsin
4 Replies

8. Shell Programming and Scripting

Script Input Paramaters

I'm trying to write a simple script to send e-mails using ksh on a Sun Solaris box. The script is as follows: # Arguments: $1 = Command Type i.e. mailx etc # $2 = Subject # $3 = From # $4 = To # $5 = Mail File # # IF MAIL TYPE IS mailx THEN... (2 Replies)
Discussion started by: KenLynch
2 Replies

9. Shell Programming and Scripting

Passing PL/SQL variable value to Shell Varible

Hi my UNIX Friends, Im calling some SQL scripts through Unix Shell scripting. How do I export the value of PL/SQL variable value into a Unix shell script variable? Also could any one inform me about the 'search' and 'cut' utility of PL/SQL (like 'grep' and 'cut' in Shell scripting). ... (10 Replies)
Discussion started by: ganapati
10 Replies

10. UNIX for Dummies Questions & Answers

command line paramaters

how do you get the 10... element from a command line arguments. ex:#!/usr/bin/ksh echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 param "this" "is" "the" "worst" "script" "in" "the" "whole" "world" "for" "sure" output: this is the worst script in the whole world this0 its... (1 Reply)
Discussion started by: edog
1 Replies
Login or Register to Ask a Question