as an additional hint for pasting code between the [code="sql"] tags, add a couple of carriage returns between the opening and closing tags. Doing that will usually keep the code from changing the comparison operators (e.g. > and <).

Jason AKA CirqueDeSQLeilI have given a name to my pain...MCM SQL Server, MVPSQL RNNR