Share via


WITH -- AS Group Alias Predicate in Windows SharePoint Services Search SQL Syntax

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Column group aliases provide a way to use shorter names in place of the name of a column or a group of columns. The optional group alias predicate is part of the WHERE clause.

…WHERE[ WITH(<columns>) AS #<alias_name>] 

Remarks

You can specify more than one group alias, separating the WITH…AS predicates by commas.

When a group alias is referred to in a WHERE clause predicate, the condition is applied to each column in the group. The logical values resulting from matching each column are combined by using the OR logical operator.

The alias must be defined before it can be used, and it can only be used within the WHERE clause. The alias_name must be a regular identifier preceded with a required pound sign (#).

Note

Only the FREETEXT predicate supports column grouping and aliases by using the WITH…AS predicate. The CONTAINS predicate does not support column grouping and aliasing.

The columns specifier can contain one or more column specifiers, separated by commas. The list of columns must be enclosed in parentheses and weighting can be assigned to each. Each column has the following syntax:

<column_identifier> [<weight_assignment>]

For information on specifying column weights, see FREETEXT Predicate and CONTAINS Predicate.

The column identifier can be regular or delimited.

See Also

Reference

WHERE Clause