Description:
Reorganize a composite table and write it to another composite table file.
Syntax:
|
|
Note:
The function rearranges composite table or multi-zone composite table f and writes it to file or homo-names files group f’, with patch tables merged into it. It reorganizes f itself and re-creates the index when f’ is absent. It changes structure of zone tables when f’ is a homo-names files group; parameter x is the zone table expression.
Parameters:
f |
A composite table file/multi-zone composite table/ |
f’ |
A composite table file or a homo-name files group |
x |
Zone table expression |
Options:
@u |
Write the file as an uncompressed one; perform the write as usual if the parameter is omitted |
@z |
Write the file as a compressed one; won’t perform compression if the option is absent |
@r |
Write the file by row; perform the write as usual if the parameter is omitted |
@c |
Write the file by column |
@q |
A quick reset |
Return value:
Boolean value
Example:
|
A |
|
1 |
=file("D:\\test1.ctx") |
An existing composite table file |
2 |
=A1.reset(file("D:\\e1.ctx")) |
Copy composite table file test1 to e1.ctx |
3 |
=A1.reset@z(file("D:\\e2.ctx")) |
Copy composite table file test1 as a segmented file |
4 |
=A1.reset@c(file("D:\\e3.ctx")) |
Copy composite table file test1 as a columwise stored file |
5 |
=A1.reset@u(file("D:\\e4.ctx")) |
Copy composite table file test1 as an unsegmented file |
6 |
=A1.reset() |
Clear test1.ctx and re-create index for it |
7 |
=A1.reset@r(file("D:\\e5.ctx")) |
Copy composite table file test1 as a rowwise stored file |
8 |
=file("D:\\emp12.ctx") |
|
9 |
Open A8’s composite table file and data in its base table is as follows: |
|
10 |
=create(EID,NAME).record([4,"Emily"]) |
|
11 |
=A9.delete(A10) |
Delete A12’s record from A10’s composite table |
12 |
=A9.close() |
Close the composite table |
13 |
=A8.reset@q() |
Reset the composite table file |
14 |
=file("emp.ctx":[2,3]) |
Return a homo-name files group |
15 |
=file("emCp.ctx":[2,3]) |
|
16 |
=A14.reset(A15) |
Reorganize 2.emp.ctx and 3.emp.ctx in A14’s homo-name files group and write them to 2.empCp.ctx and 3.empCp.ctx respectively in a new files group |