cs.select(x,ch’ )

Description:

Send records in a cursor that can’t meet the given condition into a channel.

Syntax:

cs.select(x,ch’)

Note:

The function calculates expression x against each of the records in cursor cs, and sends those records over which the value of x is false into channel ch’.

Parameter:

cs

A cursor

x

A Boolean value

ch’

A channel

Return value:

Channel

Example:

 

A

 

1

=demo.cursor("select EID,NAME,SALARY from EMPLOYEE" )

 

2

=channel()

Create a channel.

3

=A1.select(EID<5,A2)

Push cursor A1’s records not meeting condition EID<5 into A2’s channel.

4

=A2.fetch()

Fetch and store the existing data in the channel.

5

=A1.fetch()

Fetch data from the filtered cursor.

6

=A2.result()

Get result from the channel.