• drew.allen (1/21/2013)


    ScottPletcher (1/21/2013)


    Huh? I don't see anywhere a "datetime" data type is specified, only varchar. I don't see why the code couldn't run fine as is.

    I guess your actual data type is different than shown in your sample code?!

    In the CASE expression, the WHEN clause outputs a DATETIME value, but the ELSE clause outputs a VARCHAR value.

    Drew

    D'OH, I didn't scroll down in the code.

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