• err 365 are there any plans to remove this restriction??

    From mirdepastor@gmail.com@21:1/5 to All on Tue Dec 24 11:45:42 2019
    Il giorno domenica 27 novembre 2011 16:55:08 UTC+1, Superboer ha scritto:
    IBM Informix Dynamic Server Version 11.70.UC4IE

    if i leave out the order by the spl works.. so
    i guess order by is not allowed...??


    create procedure tessie ()

    define i int;
    define f_lname like customer.lname;
    define f_customer_num int;

    foreach mycurr for select customer_num, lname into f_customer_num,
    f_lname
    from customer order by customer_num

    update customer set lname = "x"|| trim (lname )
    where current of mycurr;

    end foreach;

    end procedure;


    execute procedure tessie();
    365: Cursor must be on simple SELECT for FOR UPDATE.


    Workaround would be:

    create procedure tessie ()

    define i int;
    define f_lname like customer.lname;
    define f_customer_num int;

    foreach select customer_num, lname into f_customer_num, f_lname
    from customer order by customer_num

    update customer set lname = "x"|| trim (lname )
    where customer_num = f_customer_num;

    end foreach;

    end procedure;


    execute procedure tessie();

    but that could cause deadlocks if one is not carefull...

    one more, are there any plans to put the case statement from xps into
    IDS??

    comments are welcome

    Superboer.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)