Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Parsing Variable value from SQLPLUS to Batch File

user1888509Jan 21 2010 — edited Jan 22 2010
Hi,

I have some problem to parse the value from sqlplus to batch file.

This is my code

---------In abc.sql--------------

SET DEFINE '}'

variable vTemp VARCHAR2(1);

BEGIN
:vTemp :='AAA BBB CCC';
END;
/

exit :vTemp;

EXIT;

-----------------------------



-----in batch file -----------------------------
set jclid=%1
sqlplus.exe scott/tiger@db123 @D:\abc.sql

echo echo %errorlevel% --> how to get value return by vTemp ??

:END

----------------


My question is, how do i get the value of vTemp in batch file that returned by sqlplus.


Thanks,
Iwan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2010
Added on Jan 21 2010
3 comments
1,916 views