Home Search

DriveWorks Solo 22
TableTakeRows

Send Feedback

TableTakeRows

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

Syntax

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

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 DynamicsIndianapolisUnited States
Eagle SizzlersColumbusUnited States
Everso LuckyBurlingtonUnited States
Forty SomethingsChicagoUnited 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"}