Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: procedure error

RE: procedure error

From: Seefelt, Beth <Beth.Seefelt_at_TetleyUSA.com>
Date: Mon, 28 Jan 2002 11:27:46 -0800
Message-ID: <F001.003FDA92.20020128111732@fatcity.com>

First, do a SHOW ERROR after you compile to see what/where the error is.

You can't issue DDL in a procedure. Look at using dynamic sql instead, eg. -

EXECUTE IMMEDIATE 'Drop Table PRIMUS_TEMP_DUMP';

HTH, Beth

-----Original Message-----

Sent: Monday, January 28, 2002 1:45 PM
To: Multiple recipients of list ORACLE-L

I am trying to create the following procedure but getting the error "compiled with errors" Can anyone tell me why?

Thanks In advance

CREATE OR REPLACE PROCEDURE Primus_Report as
Begin
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_7_DAYS       VARCHAR2 (255),
  NO_LINKS_LAST_120_DAYS      VARCHAR2 (255) );
INSERT INTO PRIMUS_TEMP_DUMP (solution_id,Title) SELECT pc_solution_id, pc_title FROM pt_solution; End;

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Lance Prais
  INET: lprais_at_ts.checkpoint.com

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: ListGuru_at_fatcity.com (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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Seefelt, Beth
  INET: Beth.Seefelt_at_TetleyUSA.com
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: ListGuru_at_fatcity.com (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). Received on Mon Jan 28 2002 - 13:27:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US