Solved

execute script from sqlplus command line

Posted on 2007-11-15
2
39,425 Views
Last Modified: 2013-12-19
Hi,

I execute sqlplus myuser/mypassword@myhost @c:\temp\batchtest.sql

In the batchtest.sql, I have this :

spool C:\Temp\test1.txt
@C:\Temp\testphm.sql
spool off
exit


In the testphm.sql, I have this :

DECLARE
tbl_exist PLS_INTEGER;
BEGIN
SELECT COUNT(*) INTO tbl_exist FROM user_tables WHERE table_name = 'ADP';
END;

When I execute the prompt is like this :

Connected to:
Oracle9i Release 9.2.0.8.0 - Production
JServer Release 9.2.0.8.0 - Production

  8

It's stop with this "8" which seems the last line number of the script...

Any idea ?

TIA.
0
Comment
Question by:s2000_com
2 Comments
 
LVL 1

Accepted Solution

by:
bobbymanocha earned 250 total points
ID: 20289266
Add a / at the end of the PL/SQL block, like so:

DECLARE
tbl_exist PLS_INTEGER;
BEGIN
SELECT COUNT(*) INTO tbl_exist FROM user_tables WHERE table_name = 'ADP';
END;
/
0
 

Author Comment

by:s2000_com
ID: 20289308
Thanks a lot !
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now