Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    10

    Unanswered: Error(53,3): PL/SQL: ORA-00928: missing SELECT keyword

    Hi ,

    I am unable to resove the mentioned error in the below.
    Can any one please help in sorting the issue.

    create or replace
    procedure "SP_IMPDATAUNDEFINED"
    as
    dataobjectname varchar2(255);
    description varchar2(255);
    SPECNAME VARCHAR2(255);
    aggregate1 varchar2(20) ;
    classification varchar2(10);
    ERROR_ID VARCHAR2(275);
    BEGIN
    WITH tmp_errors AS
    (SELECT do_name FROM tmp_dataobject WHERE int_id =2
    /* all inputs */
    MINUS
    SELECT do_name FROM tmp_dataobject WHERE int_id = 1
    ),
    tmp_warnings AS
    (SELECT do_name
    FROM tmp_errors
    WHERE do_name IN
    ( SELECT do_name FROM tmp_dataobject WHERE int_id = 3
    )
    ),
    real_errors AS
    (SELECT do_name FROM tmp_errors
    MINUS
    select do_name from tmp_warnings
    ),
    Out_put as (
    select
    re.do_name as doname,
    'Undefined data declared in input table' as descrp,
    do.module_name as module,
    DO.AGGR AS AGGREG,
    'ERROR' as class1,
    'IMPDATAUNDEF-' ||re.do_name as errorid
    FROM real_errors re,
    tmp_dataobject DO
    where re.do_name = do.do_name
    AND DO.INT_ID = 2
    /* only display an error if do_name is in input table */
    UNION
    select
    rw.do_name as doname,
    'Undefined data declared in input table' as descrp,
    do.module_name as module,
    DO.AGGR AS AGGREG,
    'WARNING' as class1,
    'IMPDATAUNDEF-' ||rw.do_name as errorid
    FROM tmp_warnings rw,
    TMP_DATAOBJECT DO
    where rw.do_name = do.do_name
    AND DO.INT_ID = 2
    )
    declare c1 Cursor for
    SELECT
    DONAME,
    DESCRP ,
    MODULE,
    AGGREG,
    CLASS1,
    ERRORID
    FROM Out_put;
    open c1;
    LOOP
    fetch c1 into dataobjectname,
    description,
    SPECNAME,
    aggregate1,
    CLASSIFICATION,
    ERROR_ID;
    end loop;
    close c1;
    COMMIT;
    end;

    Thanks In Advance

    Shiva

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    in db2 environment (this is a db2 forum..)?
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •