Solved

supress PL/SQL procedure completed ... Return value from sql plus

Posted on 2004-08-05
4
318 Views
Last Modified: 2013-12-26
Hi,
 I want to return a value from a oracle stored procedure.

 VALUE=` ${ORACLE_HOME}/bin/sqlplus -s   <<-EOF
                ${ORA_USER}/${ORA_PASSWORD}
                @${SQL_SCRIPT}
        EOF`

        echo $VALUE


I am doing the above, however $VALUE always contains "PL/SQL procedure completed successfully". Is there anyway to supress that last bit? and just return the actual value.
0
Comment
Question by:mash79
  • 2
  • 2
4 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 100 total points
ID: 11732900
Hi mash79,

var=`echo $VALUE | sed 's/PL\/SQL procedure completed successfully//'`
echo $var

Sunnycoder
0
 

Author Comment

by:mash79
ID: 11732938
Thanks.
That way worked.

Is there any way that can actually supress it from sqlplus?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11732941
sorry, dont know about that
0
 

Author Comment

by:mash79
ID: 11732974
FYI:

set FEEDBACK OFF;

will do it

Thanks all the same.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tab names are off by one 5 54
string initialization in java 11 114
FizzBuzz challenge 9 81
Sed question 2 87
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question