Returns a specified number of rows. You can specify multiple additional field and value pairs as part of an AND clause. The function returns an empty set when no values match.


LookupOrderedRows(1, 2, 3, 4, 5)

Function Properties

1stringRequiredName of data extension from which to return specified rows
2numericRequiredNumber of rows to return. A value less than 1 returns the default 2000 rows. This limitation enhances script performance.
3stringRequiredDefines order of return as field ASC or field DESC
4stringRequiredField to use to build WHERE clause
5stringRequiredValue to use to build WHERE clause


This call returns the 4 rows from the Cars data extension with the highest horsepower that match the value specified by MPG.