Description:
Evaluate the expression with each member in the cursor.
Syntax:
cs.(x) |
|
cs.() |
Retrun cs itself |
Note:
The function evaluates the expression using each member of the cursor and returns results as a cursor.
Parameter:
cs |
Cursor |
x |
An expression that is generally a single field name; or a legal expression composed of multiple field names. Both can use ~ to reference the current record. |
Return value:
A cursor consisting of values of expression x calculated from every member
Example:
|
A |
|
1 |
=connect("demo").cursor("select * from EMPLOYEE where EID<10") |
|
2 |
=A1.(age(BIRTHDAY)) |
Compute age according to A1’s BIRTHDAY field |
3 |
=A2.fetch() |
|
4 |
=connect("demo").cursor("select * from SCORES where SCORE<60") |
|
5 |
=A4.(SCORE) |
|
6 |
=A5.(~*~) |
Use ~ to reference the current sequence member |
7 |
=A6.fetch() |
|
8 |
=demo.cursor("select * from DEPARTMENT") |
|
9 |
=A8.() |
Return A8 |
10 |
=A9.fetch() |
|