Home » SQL & PL/SQL » SQL & PL/SQL » PLSQL procedure
PLSQL procedure [message #281278] Fri, 16 November 2007 05:46 Go to next message
balajisundar
Messages: 29
Registered: October 2007
Junior Member
Hi Guys,

I'm trying to convert some sql scripts to procedures. When i tried compiling the procedure it doesn't recognise sql commands like drop, alter etc.

Please can any one provide links where i can get information on the checks that should be done if i need to convert sql scripts to Plsql procedures.

Thanks in advance,
Balaji
Re: PLSQL procedure [message #281279 is a reply to message #281278] Fri, 16 November 2007 05:48 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
here But I'm pretty sure that you have been pointed to the documentation a multitude of times, why do you insist on ignoring it?
My Bad, Balaji, I was thinking of a different user. My apologies. The documentation link above will point you in the right direction

[Updated on: Fri, 16 November 2007 05:50]

Report message to a moderator

Re: PLSQL procedure [message #281294 is a reply to message #281278] Fri, 16 November 2007 06:22 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why do you want to change SQL script to PL/SQL?

DDL can only be executed in PL/SQL using "execute immediate" statement (see pablolee's link) or dbms_sql package.

Regards
Michel
Re: PLSQL procedure [message #281321 is a reply to message #281294] Fri, 16 November 2007 07:10 Go to previous messageGo to next message
balajisundar
Messages: 29
Registered: October 2007
Junior Member
Its a requirement that i need to pack all sql scripts on to a single package and automate the job.which was done before by executing manually all the sql scripts.

Thanks,
Balaji
Re: PLSQL procedure [message #281325 is a reply to message #281321] Fri, 16 November 2007 07:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Packaging does not mean PL/SQL nor automate the job.
You can use scripting.

If you do it in a PL/SQL package, you must have the necessary privilege directly granted to you.

Regards
Michel
Re: PLSQL procedure [message #281328 is a reply to message #281325] Fri, 16 November 2007 07:30 Go to previous messageGo to next message
balajisundar
Messages: 29
Registered: October 2007
Junior Member
hi Michael,

I have the privilege granted to execute. Probably i will write a script that will call all the procedures in the package.

is that fine?

Regards,
Balaji
Re: PLSQL procedure [message #281333 is a reply to message #281328] Fri, 16 November 2007 07:40 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I don't know as I don't know what you do and what you have to do.

Regards
Michel
Re: PLSQL procedure [message #281334 is a reply to message #281278] Fri, 16 November 2007 07:43 Go to previous message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Just curious as to why there needs to be DROP or ALTER in any code that is run repeatedly.
Previous Topic: How to implement Multi-streaming loading data concurrently
Next Topic: Populate Ref Cursor
Goto Forum:
  


Current Time: Sun Dec 04 00:35:21 CST 2016

Total time taken to generate the page: 0.09380 seconds