relative

Moves the cursor to the row that is int number of rows relative to the current row, then fetches the row.

Syntax

RELATIVE int Identifier

Description

After the cursor is created with the Get Scroll Insensitive Cursor command, moves the cursor to the row that is int number of rows relative to the current row, then fetches the row. It displays a banner and the values of the row.

Example

sqlf(PEERCLIENT)> get scroll insensitive with nohold cursor scrollCursor as 'select * from firsttable order by id';
sqlf(PEERCLIENT)> absolute 3 scrollCursor;
ID         |NAME
------------------------
30         |THIRTY
sqlf(PEERCLIENT)> first scrollCursor;
ID         |NAME
------------------------
10         |TEN
sqlf(PEERCLIENT)> next scrollCursor;
ID         |NAME
------------------------
20         |TWENTY
sqlf(PEERCLIENT)> last scrollCursor;
ID         |NAME
------------------------
50         |Fifty
sqlf(PEERCLIENT)> previous scrollCursor;
ID         |NAME
------------------------
40         |Forty
sqlf(PEERCLIENT)> relative -1 scrollCursor;
ID         |NAME
------------------------
30         |THIRTY