wanting to gather rows that dateFoo is not the same as dateBar + day(1) tried using DATEADD without any success, for example: select * from table where dateFoo != DATEADD(dayofyear, 1, dateBar) but get the error back: Syntax error: Data Type "dayofyear" does not match Defined Type name. also tried a + 1, but that seems to only work on oracle and not sql.
... WHERE dateFoo <> DATEADD(day,1,dateBar)
of course, that'll only work if dateFoo and dateBar are actual DATE or DATETIME columns
p.s. guido, it's microsoft sql server
This topic is now closed. New replies are no longer allowed.