on 03-28-2014 9:27 AM
Dear all,
I have requirement in HANA SQL stored procedure to select the Nth record from the table. The number "N" is derived based on some conditions in the SQL.
Could you please help in framing out the query.
Regards,
Yogesh
Hi Yogesh,
The best option to solve your question seems to be OFFSET and LIMIT from SELECT statment.
SELECT - SQL Reference - SAP Library
Inside your procedure you can find the Nth number you want and use it as offset with -1. If you only wat one row so LIMIT to 1, or obtain how many you want later.
Regards, Fernando Da Rós
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use row number . I guess you might have already checked this thread:
Do we have a ROWID or equivalent in HANA ? | SAP HANA
Regards,
Krishna Tangudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.