Advanced Filters / SQL of Contact Records

R

Ralph Bender, MBA

I use Outlook 2003 to mail merge my electronic newsletter. Until recently,
we used a category tag (Newsletter) to sift through the contacts and give me
the records to use. Unfortunately, the categories field got corrupted
(erased) and we didn't discover the problem until after an automated
backup/archive subsequently archived the corrupted data.

So, what I decided to do was send it to everyone in my database and then
build a filter to eliminate those records that shouldn't get it. I did have
the sense over the years to include the word "Remove" in the notes field as
well as in the category field, so there's some restriction on the people
who's email I want to keep, but that don't want my newsletter.

My problem is that I've been unable to get the SQL code right. The following
code should not allow any record to show that doesn't meet these criterion:
1. has email address
2. does not have word "remove" in either the notes field nor in the
categories
3. does not have the category "business"

("DAV:isfolder" = false AND "DAV:ishidden" = false) AND
((NOT("http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/8084001f"
IS NULL) AND ("urn:schemas-microsoft-com:eek:ffice:eek:ffice#Keywords" <> 'Remove'
OR "urn:schemas-microsoft-com:eek:ffice:eek:ffice#Keywords" <> 'Business') AND
"urn:schemas:httpmail:textdescription" <> 'Remove'))

Unfortunately, it currently lets business records through the filter.

Thanks,
Ralph
 
S

Sue Mosher [MVP-Outlook]

AND your two keywords criteria instead of ORing them.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top