If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > sql to limit

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-08-10, 22:06
mobio.dev mobio.dev is offline
Registered User
 
Join Date: Dec 2010
Posts: 2
sql to limit

hi expert, i'm having following sql

SELECT E.SEQ_NO, E.SUBJECT, M.SUBMODULE_NAME, E.SEND_STATUS, E.SEND_DT, E.CREATE_DT, E.CREATE_ID FROM PR_SEND_EMAIL E, UA_SUBMODULE M
WHERE E.SUBMODULE_ID = M.ID order by E.SEQ_NO desc,E.CREATE_DT desc

this will return all record, but now looking for sql where to get record for 0-10, or 11-20, or 21-30 for pagination,

when i search there is keyword limit, offset, skip but its not support by informix, do anyone can guide me,

thanks in advance
Reply With Quote
  #2 (permalink)  
Old 12-09-10, 11:23
sqlfan sqlfan is offline
Registered User
 
Join Date: Jul 2010
Posts: 7
Informix:
SELECT FIRST 10 * FROM T order by a

Informix (row numbers are filtered after order by is evaluated. SKIP clause was introduced in a v10.00.xC4 fixpack):
SELECT SKIP 20 FIRST 10 * FROM T order by c, d

For more sql statements, you can check out: sql statements
Reply With Quote
Reply

Tags
pagination, sql

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On