I am creating a stored procedure for db2. But it is giving an error saying
that

> "SQL Error [42601]: An unexpected token "END-OF-STATEMENT" was found
> following "SS_TOKEN_BAK".  Expected tokens may include:  " END IF"..
> SQLCODE=-104, SQLSTATE=42601, DRIVER=4.23.42".

Following is the part of my stored procedure which gives the above error.



CREATE OR REPLACE PROCEDURE TOKEN_CLEANUP_SP

    BEGIN

    DECLARE batchSize INTEGER;

    -- ------------------------------------------
    -- CONFIGURABLE ATTRIBUTES
    -- ------------------------------------------
    SET batchSize = 10000;

    -- ------------------------------------------------------
    -- BACKUP IDN_OAUTH2_ACCESS_TOKEN TABLE
    -- ------------------------------------------------------
    IF EXISTS (SELECT TABLE_NAME FROM TABLES WHERE TABLE_NAME =
'IDN_OAUTH2_ACCESS_TOKEN_BAK')
    THEN
        DROP TABLE IDN_OAUTH2_ACCESS_TOKEN_BAK;
    END IF;

    END/


Is anyone face this type of issue?. Any help on this would be much
appreciated.

Thanks,
Nila.

-- 
Nilasini Thirunavukkarasu
Software Engineer - WSO2

Email : [email protected]
Mobile : +94775241823
Web : http://wso2.com/


<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to