Share via


FROM Predicate

FROM Predicate

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. The Structured Query Language (SQL) FROM Predicate is used in the SQLSELECT Statement to indicate where the search takes place.

Syntax

FROM "URL"

In the above syntax "URL" is the URL of a folder in an Exchange store where the shallow traversal search is to take place.

Example

This is an example of a simple SQL query string. In the third line, strURL is a string containing the URL of the folder to be searched. In the fourth line, sender is a string containing the name of a sender.

'construct the SQL query
strQ = "SELECT ""urn:httpmail:subject"" "
strQ = strQ & "FROM """ & strURL & """ "
strQ = strQ & "WHERE ""urn:schemas:httpmail:sendername"" = '" & sender & "'"

Remarks

The optional SQLSCOPE Element can also be used in the FROM Predicate:

FROM SCOPE('[shallow|deep|hierarchical] traversal of "URL"')

The SCOPE Element is used to specify the depth of the search. See the SCOPE Element topic for more information about this optional statement.

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.