![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing more than one argument in a function | jisha | Shell Programming and Scripting | 1 | 04-23-2008 03:05 AM |
| passing argument into awk | prkfriryce | Shell Programming and Scripting | 4 | 02-01-2007 12:44 PM |
| Problem with Argument Passing | A_Rod | Shell Programming and Scripting | 4 | 09-13-2006 08:47 AM |
| Thread Argument Passing | narom | High Level Programming | 2 | 01-19-2006 09:10 AM |
| Passing argument from one script to other | lloydnwo | Shell Programming and Scripting | 3 | 10-27-2005 11:06 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Passing argument to a pl/sql block
Hi,
How can I pass an argument to a pl/sql block through perl/unix shell scripting. |
| Forum Sponsor | ||
|
|
|
|||
|
shell script version:
Code:
var="42"
printf "'%s'" "THIS IS A STRING" | read string_var
sqlplus -s user/passwd@somedb <<EOF
DECLARE
mynum NUMBER(4):=$var;
mystring VARCHAR2(32):=$string_var;
BEGIN
UPDATE MYTABLE
SET FLD1=mystring WHERE FLD2=mynum;
COMMIT;
END;
/
EOF
|
|
|||
|
What if I have a file ex.txt with contents
23423 5645 45646 567567 56756 5675 567567 345345 and I want to pass each of these as an argument (ARG_I_ORD_KEY) to PL/SQL block. DECLARE RetVal INTEGER; ARG_I_ORD_KEY NUMBER; BEGIN ARG_I_DOC_KEY := NULL; RetVal := DBPROD.PILOT_Subdoc_Mgr.ONLINEORDAPPROVED ( ARG_I_ORD_KEY ); END; |
|||
| Google UNIX.COM |