I'm aware of LIMIT and OFFSET, available in both DB2's but for my requirements I need to use WHERE.
DB2/ZOS 12 supports ...
WHERE (WORKDEPT, EDLEVEL, JOB) > ('E11', 12, 'CLERK')
but apparently not DB2/400?
Please someone tell me I'm wrong.
References
DB2/ZOS https://www.ibm.com/support/knowledgecenter/en/SSEPEK_12.0.0/wnew/src/tpc/db2z_12_sqlpagination.html
DB2/400 https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/sqlp/rbafymultiplewhere.htm
There are 3 completely different platforms for DB2
Despite sharing the DB2 name, they are completely separate products with different code bases.
IBM does try to ensure compatibility, but that doesn't mean that every platform has the same capabilities or gets new features at the same time.
So no, Db2 for i doesn't currently support non-equal row-value-expressions in the WHERE. You'll have to go old school.
WHERE
(WORKDEPT = 'E11' and EDLEVEL = 12 and JOB > 'CLERK)
or (WORKDEPT = 'E11' and EDLEVEL > 12)
or (WORKDEPT > 'E11')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.