Partilhar via


FROM Clause in SharePoint Search SQL Syntax

Applies to: SharePoint Server 2010

Follows the SELECT statement to specify where to search for matching documents.

FROM SCOPE()

Remarks

In SharePoint Server search, you can only specify SCOPE() for the scope name. This is a change from Microsoft Office SharePoint Portal Server 2003 Search. In SharePoint Portal Server 2003 Search, you specified the scope name in the FROM clause, for example:

FROM Portal_Content..Scope() WHERE…

For SharePoint Server search, you specify the scope name in the WHERE clause, as follows:

FROM Scope() WHERE "scope"='All Sites'…

Note

The scope name is case-sensitive, and you must include double-quotation marks (") around scope.

For information about how to specify search scopes in a query, see "Specifying Search Scopes" in WHERE Clause in SharePoint Search SQL Syntax.

See Also

Reference

WHERE Clause in SharePoint Search SQL Syntax

Concepts

SharePoint Search SQL Syntax Reference