cs .run()

Read(166) Label: cursor, expression,

Description:

Compute one or more expressions against each of the records in a cursor.

Syntax:

cs.run (xi:Fi,…)

Note:

The function computes expression xi over each record in the cursor, assigns each result to Fi field, and returns the modified cursor cs. It supports multicursors.

Parameters:

cs

Cursor

xi

An expression

Fi

A field of cs

Return value:

  The modified original cursor

Example:

 

A

 

1

=connect("demo").cursor("select * from EMPLOYEE")

 

2

=A1.run(SALARY+1000:SALARY)

 

3

=A2.fetch()

4

=connect("demo").cursor("select DEPT,NAME,BIRTHDAY,1 as AGE from EMPLOYEE")

 

5

=A4.run(age(BIRTHDAY):AGE)

 

6

=A5.run(AGE-20:AGE)

 

7

=A6.fetch()

Related functions:

A.run(xi:Fi,)