Home Forums SQL Server 2008 T-SQL (SS2K8) wish to add rows having NULL values as placeholders for "missing" dates RE: wish to add rows having NULL values as placeholders for "missing" dates

  • FROM CalenderTable LEFT OUTER JOIN TableWithOtherDatesInIt

    That's the starting point. Your where clause was filtering out any nulls and essentially turning the join into an inner join.

    You don't want to be doing any messy date to string conversions, they're both date columns, so just compare directly. CAST as DATE if one contains times.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass