The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's manas6 UNIX for Dummies Questions & Answers 0 06-05-2008 07:44 AM
asking about return code naamas03 Shell Programming and Scripting 3 08-28-2007 05:53 AM
Incorporte Return Code u263066 Shell Programming and Scripting 2 09-06-2006 05:58 AM
return code not captured ranj@chn Shell Programming and Scripting 2 09-06-2006 04:24 AM
Return Code of tar in AIX dupeng AIX 3 02-23-2004 12:05 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-29-2003
Shaz Shaz is offline
Registered User
  
 

Join Date: May 2002
Posts: 23
Return code from PL/SQL Code

Hi Guys,
I was just wondering if anybody can help me with this problem.

OK, how we can get a value back from PL/SQL Script (not stored procedure/function)

See the below example: (for example aaa.sh)

#!/bin/ksh

VALUE=`sqlplus -s user/password@test_id <<EOF
@xxx.sq
EOF`
echo $VALUE

And xxx.sql is like below:

DECLARE
x number = 10;
y number = 0;
BEGIN
y = x /2;
END;
/
exit

OK, I'd like to get the value of "y" variable from xxx.sql back into the calling aaa.sh VALUE variable...

Mind you "exit y;" doesn't help...

Thanks in advance.


l
 

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 11:15 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