T.update( P )

Read(44) Label: pseudo table, update, record,

Description:

Update records in a pseudo table.

Syntax:

T.update(P)

 

Note:

The function updates pseudo table T’s records by matching both T and record sequence P’s key values; P and T should have same structure. If a key value in P doesn’t exist in T, append or insert the corresponding record in T.

Parameters:

T

A pseudo table object

P

A table sequence/record sequence having same structure as T

Options:

@i

Only append or insert non-matching records and ignore the matching ones

@u

Only update the matching records and ignore the non-matching ones

@n

Return records that are updated and inserted

Return value:

A pseudo table object

Example:

 

 

A

 

1

=create(file).record(["D:/file/pseudo/Employee.ctx"])

 

2

=pseudo(A1)

 

Generate a composite table file object

3

=create(Dept,AvgSalary).record(["HR",7000,"CSD",6018.04])

Return a table sequence

4

=A2.update(A3)

Use 3’s pseudo table to update A2’s pseudo table by matching their key values

5

=A4.import()