Hello Lance This one works:
CREATE OR REPLACE PROCEDURE Primus_Report AS begin execute immediate 'Drop Table PRIMUS_TEMP_DUMP'; execute immediate 'CREATE TABLE PRIMUS_TEMP_DUMP (SOLUTION_ID VARCHAR2 (85) NOT NULL) TITLE VARCHAR2 (3498)), OWNER VARCHAR2 (255), P_TYPE VARCHAR2 (96), AUTHOR VARCHAR2 (255), MODIFIED_BY VARCHAR2 (255), ESCALATION_GROUP VARCHAR2 (255), TECH_RESOURCE VARCHAR2 (255), P_PARTITION VARCHAR2 (96), STATUS VARCHAR2 (96), HyperLinks VARCHAR2 (96), Style_reviewer VARCHAR2 (96), DATE_CREATED DATE, DATE_MODIFIED DATE, ALERT VARCHAR2 (96), URGENCY VARCHAR2 (96), NO_PAGEVIEWS_LAST_MONTH VARCHAR2 (255), NO_PAGEVIEWS_QUARTER VARCHAR2 (255), NO_LINKS_LAST_WEEK VARCHAR2 (255), NO_LINKS_LAST_MONTH VARCHAR2 (255) )'; execute immediate 'INSERT INTO PRIMUS_TEMP_DUMP (solution_id,Title) SELECT pc_solution_id, pc_title FROM pt_solution'; end; / Yechiel Adar, Mehish Computer Services [EMAIL PROTECTED] > -----Original Message----- > From: Lance Prais [SMTP:[EMAIL PROTECTED]] > Sent: Wed, January 16, 2002 11:36 PM > To: Multiple recipients of list ORACLE-L > Subject: procedure error > > Why in toad when I try to create a stored proc where I drop and > create a table I get the following error: > > PLS-00103: Encountered the symbol "DROP" when expecting one of the > following: > begin function package pragma procedure subtype type use > <an identifier> <a double-quoted delimited-identifier> cur > > > Here is my code: > > CREATE OR REPLACE PROCEDURE Primus_Report > AS > Drop Table PRIMUS_TEMP_DUMP; > CREATE TABLE PRIMUS_TEMP_DUMP ( > SOLUTION_ID VARCHAR2 (85) NOT NULL, > TITLE VARCHAR2 (3498), > OWNER VARCHAR2 (255), > P_TYPE VARCHAR2 (96), > AUTHOR VARCHAR2 (255), > MODIFIED_BY VARCHAR2 (255), > ESCALATION_GROUP VARCHAR2 (255), > TECH_RESOURCE VARCHAR2 (255), > P_PARTITION VARCHAR2 (96), > STATUS VARCHAR2 (96), > HyperLinks VARCHAR2 (96), > Style_reviewer VARCHAR2 (96), > DATE_CREATED DATE, > DATE_MODIFIED DATE, > ALERT VARCHAR2 (96), > URGENCY VARCHAR2 (96), > NO_PAGEVIEWS_LAST_MONTH VARCHAR2 (255), > NO_PAGEVIEWS_QUARTER VARCHAR2 (255), > NO_LINKS_LAST_WEEK VARCHAR2 (255), > NO_LINKS_LAST_MONTH VARCHAR2 (255) ); > INSERT INTO PRIMUS_TEMP_DUMP (solution_id,Title) SELECT > pc_solution_id, pc_title FROM pt_solution; > end; > / > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > This e-mail was scanned by the eSafe Mail Gateway > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-8?Q?=E0=E3=F8_=E9=E7=E9=E0=EC?= INET: [EMAIL PROTECTED] Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).