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-comfficeffice#Keywords" <> 'Remove'
OR "urn:schemas-microsoft-comfficeffice#Keywords" <> 'Business') AND
"urn:schemas:httpmail:textdescription" <> 'Remove'))
Unfortunately, it currently lets business records through the filter.
Thanks,
Ralph
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-comfficeffice#Keywords" <> 'Remove'
OR "urn:schemas-microsoft-comfficeffice#Keywords" <> 'Business') AND
"urn:schemas:httpmail:textdescription" <> 'Remove'))
Unfortunately, it currently lets business records through the filter.
Thanks,
Ralph