• It looks like you are using string manipulation to convert your CoverageEffectiveDateKey and CoverageEndDateKey from yyyymmdd format to mm/dd/yyyy format.  DATEDIFF is perfectly capable of handling strings in yyyymmdd format, so don't bother doing the string manipulation.  (You may still need to convert to a string if your fields are INT keys.)

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA