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’.

Parameters:

cs

Cursor

x

A boolean value

ch’

Channel

Return value:

  Channel ch’

Example:

 

A

 

1

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

 

2

=channel()

Create a channel

3

=A1.select(EID<5,A2)

Push records that don’t meet the condition EID<5 into A2’s channel

4

=A2.fetch()

Fetch and store the existing data in the channel

5

=A1.fetch()

6

=A2.result()

Get result from the channel