Forum Replies Created

Viewing post 1 (of 1 total)

  • Reply To: Sum case nulls and 1900-01-01 00:00:00.000

    Thomas Rushton wrote:

    Sounds like an ANSI_NULLS setting thing...  Some sample code:

    DECLARE @ClosedStuff TABLE (InspectionClosed DATE NULL);

    INSERT INTO @ClosedStuff

    VALUES (NULL),(NULL),('19000101'),(GETDATE())

    SELECT * FROM @ClosedStuff

    SET ANSI_NULLS ON

    SELECT SUM(CASE InspectionClosed WHEN '1900-01-01 00:00:00.000'...

Viewing post 1 (of 1 total)