DriveWorks Pro 15: TableTakeRows [send feedback...]

TableTakeRows

Returns a new table with only the specified number of rows.

Syntax

TableTakeRows([Table] As Table, [Rows to Take] As Double)

Where:

Table is the table to take the rows from.

Rows to Take is the number of rows from the input table that should be present in the result table.

Examples

RuleMeaning
TableTakeRows(DWGroupTableCustomers,3)Will return an array of the table Customers containing the first 3 rows.

Example Data

Customers Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance
Dynamo DynamicsIndianaUnited States
Eagle SizzlersMaineUnited States
Everso LuckyVermontUnited States
Forty SomethingsIllinoisUnited States

Example Outcome

Customers Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany

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

Table returned as an Array
{"CustomerName","City","Country";"Amazon Warriors","Paris","France";"Bolton Burners","Concord","United States";"Boston Bulls","Hanover","Germany"}


Table of Contents