cs.skip()

Read(1275) Label: cursor, skip,

Description:

Skip records while fetching records from a database cursor.

Syntax:

cs.skip(n;x)

Note:

The function skips n records or till x… has changed, and returns the number of records actually skipped. If all parameters are absent, return the number of remaining records and close the cursor.

Parameter:

cs

A cursor

n

An integer

x

Grouping expression, by which cs is sorted. With x, n will be ignored

Return value:

Integer

Example:

 

A

 

1

=demo.cursor("select * from EMPLOYEE order by STATE")

Return a cursor for retrieving data, sorted by STATE.

2

=A1.skip(50;STATE)

Ignore parameter n as parameter x is present. Till the STATE has changed. The number of records actually skipped is 4.

3

=A1.fetch()

Return the remaining records in the cursor.

4

=demo.cursor("select * from EMPLOYEE order by STATE")

 

5

=A4.skip()

As the parameters are not supplied, scan the data once by skipping 500 records.

Related function:

cs.fetch()

db.cursor()