DriveWorks Solo 15: 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 As Table, Left Match Column As Double, Right Table As Table, Left Match Column As Double, Join Type As String)

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.

Left 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

Examples

RuleMeaning
TableJoin(DwLookupCustomersAtoC, 3, DwLookupCurrency, 1, "outer")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, which 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"}


Table of Contents