Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: What did you change?

UNION# returns a string containing the union of two (or more) TeLiTab sets

Syntax

UNION#(Telitab_1$, UnfoldPar_1$, Telitab_2$, UnfoldPar_2$, Mode%)

or

UNION#(Mode%, Telitab_1$, Telitab_2$, ...)

Arguments

  • Telitab_1$ is a string expression containing/returning the first Telitab set.
  • UnfoldPar_1$ is a name of parameter for which to unfold the first Telitab set.
  • Telitab_2$ is a string expression containing/returning the second Telitab set.
  • UnfoldPar_2$ is a name of parameter for which to unfold the second Telitab set.
  • Mode% determines the way to union:
    • Mode% = 0, Sparse union, i.e. tables are simply attached and not available values are indicated by -999999 (the standard code for PENDING).
    • Mode% = 1, Union combining parameters of cases with one or more corresponding parameter(s) + value(s).

...

  1. As shown, two syntax types are available. With the second syntax type you can union several (even more than two) TeLiTab datasets at once.

Examples

...

To explain the data: 
you have two objects, MODELS and PROJECTS presented as list values in Telitab_1$ containing TeLiTabs themselfs (with several parameters). 
LPP is part of the MODELS object (TeLiTab).

When you unfold Telitab_1$ dataset on parameter "LPP", you get:

...

You see that PROJECT still is a separate object (and presented as a list value in Telitab_1$). All other data (which was part of the MODELS object) now is part of Telitab_1$ and thus a table in the TeLiTab.

Telitab_2$ contains the dataset:

...

and UnfolPar_2$ contains "NullString", what means that no unfolding of Telitab_2$ is performed.

...

UNION#(Telitab_1$, "LPP", Telitab_2$, "NullString", 0)

it returns:


6 "MODMAT$" "LPP" "B" "T" "MODNO$" 
"1" "wood" 112.30 17.80 7.65 "-999999" 
"2" "foam" 133.80 21.50 9.20 "-999999" 
"3" "wood" 98.60 16.42 6.70 "-999999" 
"4" "plywood" 145.00 22.40 9.40 "-999999" 
"5" "-999999" 112.30 17.80 7.65 5684 
"6" "-999999" 162.70 27.80 11.20 6231 
"7" "-999999" 133.80 21.50 9.20 6301 
"8" "-999999" 118.50 16.70 6.80 6537 
"PROJECTS" 


"CLIENT$" "YardX" 



"CLIENT$" "YardX" 



"CLIENT$" "YardX" 



"CLIENT$" "YardX" 












}

...

UNION#(Telitab_1$, "LPP", Telitab_2$, "NullString", 1)

returns:


-6 "1" "2" "3" "4" "5" "6" 
"MODMAT$" "wood" "plywood" "wood" "-999999" "foam" "-999999" 
"LPP" 98.60 145.00 112.30 162.70 133.80 118.50 
"B" 16.42 22.40 17.80 27.80 21.50 16.70 
"T" 6.70 9.40 7.65 11.20 9.20 6.80 
"MODNO$" "-999999" "-999999" 5684 6231 6301 6537 
"PROJECTS" 


"CLIENT$" "YardX" 



"CLIENT$" "YardX" 



"CLIENT$" "YardX" 






"CLIENT$" "YardX" 



}

...

The UNION# function with Mode%=1 can be used as a database manipulation function. The union of two Telitab sets as produced by this functiun completes a set of data by combining data from two source sets in a single table (see also SECTION#() ).


 

Quick links: Function overview | Attribute overview | Constants overview | Dimensions overview