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

28 views
Skip to first unread message

Superboer

unread,
Nov 27, 2011, 10:55:08 AM11/27/11
to

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.

mirde...@gmail.com

unread,
Dec 24, 2019, 2:45:44 PM12/24/19
to
Reply all
Reply to author
Forward
0 new messages