Outlook 2003 SQL Syntax for Filter

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
Back
Top