var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Informix "for update" cursor
Any one had any idea if the for update CURSOR can be used for the following selection together with the order by:
let sql_str = "select * from tableA where ctry_cd = 'AA' ",
" for update ",
" order by accnt_no desc "
prepare stmt1 from sql_str
declare cur1 cursor for stmt1
Facing runtime error while executing the binary.
SQL statement error number -201.
A syntax error has occurred.
It's been a long time since I've looked at 4gl code but I'm pretty sure that you can't use the "order by" clause with an update cursor.
Here's the syntax I found in some old documentation:
let sqlstmt1 = "select * from tableA where cntry_cd = 'AA'"
prepare statement3 from sqlstmt1
declare my_cursor cursor for statement3 for update
I also have seen this syntax used:
declare my_cursor cursor for
select * from tableA where cntry_cd = "A"