I am getting the following error. Looks like the SQL is not correct.
Couldn't execute query. Token RNUM was not valid. Valid tokens: FOR USE SKIP WAIT WITH FETCH ORDER UNION EXCEPT OPTIMIZE. SQLCODE=-104 – SELECT * FROM ( SELECT a.*,rownum rnum FROM (select * from CARDATAT.CSISPACEP WHERE 1=1) a ) WHERE rnum > 0 AND rnum <= 1
Looks like the LIMIT or OFFSET does not work on the version of DB2 we are using. Looking for an alternative now.
Thanks
Modified the original jqgrid_dist.php to make the resulting query to get the fields to the following:
$sql = "SELECT b.* FROM (SELECT a.*,row_number() over() as rnum FROM ($query) a) b WHERE b.rnum > $offset_min AND b.rnum <= $offset_max";
– Now I am getting the grid with the correct fields as column headers but no data and an error dialog with no message. Any thoughts?
Hello,
I'll be emailing you an update after rechecking.
Which version of db2 are you using?
I am trying to add this behavior using this article.
http://www.channeldb2.com/profiles/blogs/porting-limit-and-offset