Outlook 2003 SQL Syntax for Filter

G

Guest

I am looking to write an SQL query that show the contacts whose creation date
and modified date are different.

Or, in other words, to filter and view those contacts, in which, Creation
date is NOT EQUAL to the Modify date. Or, perhaps another way of doing it is
.... Modify date is Greater than Creation date.

In either case, I'm having problems writing this query, specifically in
comparing the value of two fields.
 
K

Ken Slovak - [MVP - Outlook]

The best way to do something like that is to use the view customization
dialog and set up various conditions in the Advanced tab, then go to the SQL
tab to see what was generated. In these case you'd have to combine 2 clauses
since there isn't a way to compare one property value to another.

One thing to bear in mind is that it's usually not a good idea to compare
date values that way. Due to round-off errors they may test as unequal when
they shouldn't, it's usually better to compare to a range - modified >
created plus or minus one minute.
 

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