Writing the SQL Query
Create a standard SQL query to return the wanted information.
Note
- The UserId, rcp_guid, Email, and rcp_email fields are used in the following example because any static report can be exported to the ListManager object, and the ListManager object uses the rcp_guid and rcp_email fields in the exported report to determine whether a user ID and e-mail address have already been stored in the List Manager object.
Step 1
SQL Query =
"SELECT top 25 UserId rcp_guid, DateCreated, DateRegistered, Email rcp_email,
FirstName, LastName, TelephoneNumber, UserTitle, UserType
FROM RegisteredUser
WHERE (DateRegistered >= '03/01/2000' AND DateRegistered <=
'03/30/2000') AND UserType = 1 AND Email is not Null
ORDER BY rcp_email ASC"
Copyright © 2005 Microsoft Corporation.
All rights reserved.