Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    136

    Unanswered: ORA-00933: SQL command not properly ended

    Hello All!

    Now i have the next error..

    My procedure:

    PHP Code:
    CREATE OR REPLACE PROCEDURE PRC_CHECK_AVAIL_EXPIRED   
    (         pIdFeature FEATURE_AVAILABLE.ID_FEATURE%TYPE 

    AS 
             
    DateExpired DATE
           
    NumDays     NUMBER
           
    Message        VARCHAR2(250); 
    BEGIN     
         
        EXECUTE IMMEDIATE 
    'SELECT EXPIRE_DATE FROM FEATURE_AVAILABLE WHERE ID_FEATURE = ' || pIdFeature INTO DateExpired;     
        
    EXECUTE IMMEDIATE 'SELECT round(DateExpired - SYSDATE) FROM DUAL ' INTO NumDays
         
        
    /* LINE 11 */ Message := 'In ' || NumDays || ' Tagen läuft ab '
         
        IF 
    NumDays 3 Then 
            PRC_SEND_MAIL
    ('sender''recpt''OK!'); 
        
    ELSIF NumDays AND NumDays 0  THEN 
            PRC_SEND_MAIL
    ('sender''recpt'Message); 
           
    ELSIF Numdays 0  THEN 
            PRC_SEND_MAIL
    ('sender''recpt'Message); 
        
    ELSIF Numdays 0  THEN 
             PRC_SEND_MAIL
    ('sender''recpt''Abgelaufen!'); 
              
    INSERT INTO NOT_AVAILABLE_EXPIRED  
                                
    ID_FEATUREEXPIRE_DATE 
                        
    CREATED_ONCREATED_BYCHANGED_ONCHANGED_BY)     
                     
    VALUES (pIdFeatureDateExpiredSYSDATEUSERSYSDATEUSER);         
        ELSE 
            
    RAISE_APPLICATION_ERROR(-12345,'Expired Date Definition Error'); 
        
    END IF; 
    END

    Compiling it i get no error-messages, but calling:

    PHP Code:
    begin 
        PRC_CHECK_AVAIL_EXPIRED
    (76); 
    END
    i've got these messages:


    ORA-00933: SQL command not properly ended
    ORA-06512: at "PRC_CHECK_AVAIL_EXPIRED", line 11
    ORA-06512: at line 2



    Thanks in advance for your help!
    Last edited by julla27; 05-21-04 at 07:31.
    Regards,
    Julia

  2. #2
    Join Date
    Oct 2003
    Location
    Republic of Srpska, Bosnia and Herzegovina
    Posts
    35
    i think, u cannot use into clause in execute immediate statemant

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    136
    Thank you bato,

    it works now!
    Regards,
    Julia

Posting Permissions

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