Home Search

DriveWorks Solo 22
TableJoin

Send Feedback

TableJoin

Performs a join of the specified Tables based on matching values in columns in each of the two Tables.

Syntax

TableJoin([Left Table],[Left Match Column],[Right Table],[Right Match Column],[Join Type],[Data Rows Only],[Include Headers])

Where:

Left Table is the Table to join on the left.

Left Match Column is the number of the column which contains values that will be matched against values in the right Table.

Right Table is the Table to join on the right.

Right Match Column is the number of the column which contains values that will be matched against values in the left Table.

Join Type (optional) is the type of join to perform (either "Inner" or "Outer"), if not specified, by default it will perform an inner join:

  • Inner - returns rows from both Tables where there is a match between the columns in both Tables
  • Outer - returns all rows from the left Table and from the right Table

Data Rows Only (optional) is TRUE to only match against values in the data rows of the Table (not the header row). FALSE to match against values in all rows of the Table. By default this is FALSE.

Include Headers (optional) is TRUE to include the header row as the first row in the resulting Table. The header row will be the combination of the headers from both tables. FALSE to not include an additional header row. By default this is FALSE.

Examples

RuleMeaning
TableJoin(DwLookupCustomersAtoC, 3, DwLookupCurrency, 1, "Outer",FALSE,FALSE)Will return an outer join of the Tables CustomersAtoC and Currency. Values in column 3 of the CustomersAtoC Table are matched with values in column 1 of the Currency Table.

Example Data

CustomersAtoC Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsLondonUnited Kingdom

Currency Table

CountryCurrency
FranceEuro
United StatesDollar
GermanyEuro
United KingdomPound

Example Outcome

CustomerNameCityCountryCountryCurrency
Amazon WarriorsParisFranceFranceEuro
Bolton BurnersConcordUnited StatesUnited StatesDollar
Boston BullsHanoverGermanyGermanyEuro
Cambridge CatsLondonUnited KingdomUnited KingdomPound

DriveWorks will return the Table above as an Array. This will look like:

Table returned as an Array
{"CustomerName","City","Country","Country","Currency";"Amazon Warriors","Paris","France","France","Euro";"Bolton Burners","Concord","United States","United States","Dollar";"Boston Bulls","Hanover","Germany","Germany","Euro";"Cambridge Cats","London","United Kingdom","United Kingdom","Pound"}