The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Calling stored procedure from shell script dorisw Shell Programming and Scripting 3 06-12-2007 06:03 PM
run shell script from oracle store procedure arnabb4u Shell Programming and Scripting 8 08-16-2006 01:16 PM
Shell arrays in oracle stored procedure superprogrammer Shell Programming and Scripting 6 06-09-2005 07:36 PM
calling stored procedure from shell script. priyamurthy2005 Shell Programming and Scripting 2 04-21-2005 08:10 PM
grep command & shell procedure's stevox UNIX for Dummies Questions & Answers 1 04-25-2001 10:18 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-03-2004
ap_gore79 ap_gore79 is offline
Registered User
  
 

Join Date: Jun 2004
Posts: 5
Thumbs down return variable from PL/SQL procedure to shell

Hi
i'm calling a pl/sql procedure which is returning one variable.
i'm trying to assing this value to variable in shell script

the code i wrote is

** in shell script**
var= 'sqlplus user/pass @ret.sql'
echo $var

**

and

variable dum_var number
exec rt_test(UM_VAR);
exit;

in ret.sql

the error i'm getting is
sqlplus user/pass @ret.sql: not found.

Can somebody suggest me how to receive variable from plsql in shell.






Last edited by ap_gore79; 06-03-2004 at 05:52 PM..
  #2 (permalink)  
Old 06-03-2004
dangral dangral is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2002
Posts: 699
change var= 'sqlplus flex1/flex01 @ret.sql'
to


Code:
var= `sqlplus flex1/flex01 @ret.sql`

notice I substituted the single quotes with backticks (located above the tab key on a PC keyboard).
  #3 (permalink)  
Old 06-03-2004
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Here is a thread that describes another method --> Click Here

Also, search the boards...this question has been asked and answered a few times.
  #4 (permalink)  
Old 06-03-2004
ap_gore79 ap_gore79 is offline
Registered User
  
 

Join Date: Jun 2004
Posts: 5
Thanks

It worked fine but still its giving error

SQL*Plus:: not found.

Do i need to export any variable such as ORACLE_HOME
or PATH
  #5 (permalink)  
Old 06-03-2004
ap_gore79 ap_gore79 is offline
Registered User
  
 

Join Date: Jun 2004
Posts: 5
oh..

thanks it workd fine...

thanks for prompt reply....
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0