#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    For Select Do doesn't work


    I have written the following procedure:

    SET TERM #;

    CREATE PROCEDURE Get_All_Drivers_For_ALS
    RETURNS( id varchar(8))
    AS BEGIN
    EXIT;
    END #

    ALTER PROCEDURE Get_All_Drivers_For_ALS
    RETURNS( id varchar(8))
    AS BEGIN
    FOR SELECT MST_ID FROM MASTER WHERE(DPT_NO <> 1) INTO :id DO
    BEGIN SUSPEND; END
    END #

    SET TERM ;#

    Running this (in the MITEC IB Query developer) gives an error on the : of the INTO :id statement.
    It seems this statement or the variable is not recognized. Does someone know why?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0
    Found it.

    Although all documentation I found on the net said that I should put a ':' before the variable, Mitec doesn't want that.
    So, after skipping the : before the id, it works fine.

IMN logo majestic logo threadwatch logo seochat tools logo