Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: procedure error
DROP
and CREATE are DDL functions ... you have to use DBMS_SQL package or Native
Dynamic SQL (execute immediate) statement to achieve this.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Raj
<FONT face="Courier New"
size=2>______________________________________________________Rajendra
<FONT face=Tahoma
size=2>-----Original Message-----From: Lance Prais
[mailto:lprais_at_ts.checkpoint.com]Sent: Wednesday, January 16, 2002
4:36 PMTo: Multiple recipients of list ORACLE-LSubject:
procedure error
<FONT face=Arial color=#0000ff
size=2>Why in toad when I try to create a stored proc where I drop and
create a table I get the following error:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>PLS-00103: Encountered the symbol "DROP" when expecting one of the
following:
<FONT face=Arial color=#0000ff
size=2> begin function package pragma procedure subtype type
use <an identifier> <a double-quoted
delimited-identifier> cur
<FONT face=Arial color=#0000ff
size=2>Here is my code:
<FONT face=Arial color=#0000ff
size=2>
<SPAN
style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">CREATE<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">OR<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">REPLACE<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">PROCEDURE<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: olive; FONT-FAMILY: Courier">Primus_Report<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">Drop<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">Table<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: olive; FONT-FAMILY: Courier">PRIMUS_TEMP_DUMP<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">;<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">CREATE<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">TABLE<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: olive; FONT-FAMILY: Courier">PRIMUS_TEMP_DUMP<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> SOLUTION_ID<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">85<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">)<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">NOT<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">NULL,<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> TITLE<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">3498<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> OWNER<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> P_TYPE<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">96<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> AUTHOR<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> MODIFIED_BY<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> ESCALATION_GROUP<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> TECH_RESOURCE<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> P_PARTITION<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">96<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> STATUS<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">96<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> HyperLinks<SPAN style="mso-spacerun: yes"> <SPAN style="mso-tab-count: 2"><SPAN
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">96<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> Style_reviewer<SPAN style="mso-tab-count: 2">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">96<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> DATE_CREATED<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> DATE_MODIFIED<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> ALERT<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">96<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> URGENCY<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">96<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> NO_PAGEVIEWS_LAST_MONTH<SPAN style="mso-spacerun: yes"> <SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> NO_PAGEVIEWS_QUARTER<SPAN style="mso-spacerun: yes"> <SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> NO_LINKS_LAST_WEEK<SPAN style="mso-spacerun: yes">
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">),<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"><SPAN style="mso-spacerun: yes"> NO_LINKS_LAST_MONTH<SPAN style="mso-spacerun: yes"> <SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Courier">VARCHAR2<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Courier">255<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">)<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">);<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">INSERT<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">INTO<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: olive; FONT-FAMILY: Courier">PRIMUS_TEMP_DUMP<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">(<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">solution_id<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">,<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">Title<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">)<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">SELECT<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">pc_solution_id<SPAN
style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">FROM<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"> <SPAN style="FONT-SIZE: 10pt; COLOR: olive; FONT-FAMILY: Courier">pt_solution<SPAN style="FONT-SIZE: 10pt; COLOR: #0000f0; FONT-FAMILY: Courier">;<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">
*********************************************************************1
This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.
*********************************************************************1Received on Wed Jan 16 2002 - 16:53:14 CST