• Btw, for date/datetime, don't use "<=" on the end date, use "<".

    In this case, instead of:

    [DATE] <= (DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)))

    do this:

    [DATE] < (DATEADD(mm, DATEDIFF(m,0,GETDATE()),0))

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.