Export (0) Print
Expand All

FROM Clause in SharePoint Search SQL Syntax

Last modified: April 21, 2010

Applies to: SharePoint Server 2010

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


FROM SCOPE()

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 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.

Show:
© 2014 Microsoft