Home Search

DriveWorks Solo 22
TableSelectColumns

Send Feedback

TableSelectColumns

Retrieves the columns from the given table in the specified order, and returns the result.

Syntax

TableSelectColumns([Table], [Collection of Columns])

Where:

Table is the table from which to retrieve the columns.

Collection of Columns are the indices of the columns that should be in the result table, these can be in any order, e.g. 3,2,1 to switch the first and third columns around.

Examples

RuleMeaning
TableSelectColumns(DWGroupTableCustomers,1,3)Will return an array containing the records from columns 1 and 3 from the Customers table.

Example Data

Customers Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance
Dynamo DynamicsIndianapolisUnited States
Eagle SizzlersColumbusUnited States
Everso LuckyBurlingtonUnited States
Forty SomethingsChicagoUnited States

Example Outcome

Customers Table

CustomerNameCountry
Amazon WarriorsFrance
Bolton BurnersUnited States
Boston BullsGermany
Cambridge CatsFrance
Dynamo DynamicsUnited States
Eagle SizzlersUnited States
Everso LuckyUnited States
Forty SomethingsUnited States

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"CustomerName","Country";"Amazon Warriors","France";"Bolton Burners","United States";"Boston Bulls","Germany";"Cambridge Cats","France";"Dynamo Dynamics","United States";"Eagle Sizzlers","United States";"Everso Lucky","United States";"Forty Somethings","United States"}