Home » SQL & PL/SQL » SQL & PL/SQL » poecedure in sql plus
poecedure in sql plus [message #1861] Wed, 05 June 2002 18:46 Go to next message
aish
Messages: 44
Registered: March 2001
Member
I have .sql (.txt) file which iam ruuning in the sql plus I have various select statment which is dumping into the xL file.all these are working fine.But at the end of the txt file I have also procedure that should insert teh values into the table but it is not doing it.

I am using

execute procedure_name;

Is it another way I run this?

Also can any body tell me how to create and drop table using the .txt file and run that txt file in sqlp plus.

Thanks fro your help
Aish
Re: poecedure in sql plus [message #1864 is a reply to message #1861] Wed, 05 June 2002 22:03 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
The "TXT" file you refer to is a script. One of the ways to run a script (a series of SQL/SQL*Plus commands) is to use:

SQL>
@_path_/_script_file_

The procedure can be run with EXECUTE. Should be no problem. You should be sure the commands are all executed. Have you included a '/' or a ';' after your commands (also after the last one)?

If not, the script comes to an end without executing everything.

You can issue all sorts of SQL commands in a script (including a CREATE TABLE or DROP TABLE)

HTH,
MHE
Previous Topic: PL/SQL Program Construct
Next Topic: Re: Verifying if the data(one row) fulfilling a select criteria exists in the table or not
Goto Forum:
  


Current Time: Thu Mar 28 14:48:27 CDT 2024