dbTalk Databases Forums  

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

comp.databases.informix comp.databases.informix


Discuss err 365 are there any plans to remove this restriction?? in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Superboer
 
Posts: n/a

Default err 365 are there any plans to remove this restriction?? - 11-27-2011 , 09:55 AM






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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.