Click to Rate and Give Feedback
MSDN
MSDN Library
Office Development
SDK Documentation
General Reference
SQL Syntax
WHERE Clause
 WITH -- AS Group Alias Predicate

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
WITH -- AS Group Alias Predicate in Enterprise Search SQL Syntax

Column group aliases that provide you with 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>] 

You can specify more than one group alias, separating the WITH…AS predicates by using 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.

You must define the alias 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 (#).

NoteNote:

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 each column has the following syntax:

<column_identifier> [<weight_assignment>]

The column identifier can be regular or delimited.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker