How to use 'LIMIT' and 'OFFSET' SQL function in SAP IQ
SOLUTION
SQL function LIMIT and OFFSET is useful SQL function supported by SAP IQ to return subset of rows which satisfy the WHERE clause
Syntax
The argument LIMIT should be an integer or integer variable
The argument OFFSET must evaluate to a value greater than or equal to 0.
(If the user does not specify <offset-expression>, the default is 0).
The row limitation clause LIMIT <offset-expression>, <limit-expression> is equal to the LIMIT <limit-expression> OFFSET <offset-expression>.
Please check the example below of two SQLs which returns same results.
- Select * from SalesOrders order by CustomerIQ asc LIMIT 10 OFFSET 100 ;
- Select * from SalesOrders order by CustomerIQ asc LIMIT 100, 10