Syntax

SELECT(tabcol-spec, select-expr[, omit-repeats?])

Description

SELECT() produces a list of values from the column specified by tabcol-spec from rows for which select-expr evaluates as TRUE.

tabcol-spec is a literal Text value of the form, table-name[column-name] (e.g., Customers[Name]), naming both the table to scan (table-name) and the column in that table (column-name) from which values are to be returned.

select-expr is an expression that returns a Yes/No value (TRUE or FALSE) indicating whether a row's value in the column named by column-name should be included in the results. select-expr is evaluated once for each row in the table named by table-name.

omit-repeats? is a Yes/No value. If FALSE or omitted, it indicates the results should include values of column-name from all selected rows; if TRUE, only one occurrence of each distinct value is included (i.e., duplicates are removed).

Return Value

A list: the value from the  column from each row selected by select-expr in the table named by table-name, optionally with duplicates removed per omit-repeats?.

The results list is in an arbitrary order, subject to the internal needs of the function; any apparent ordering should be considered coincidental.

Did this answer your question?