WITH Ranks AS
(
SELECT * , ROW_NUMBER()
OVER (PARTITION BY
WeekStartDate,
WeekEndDate,
WeekNum,
WeekName,
PeriodStartDate,
PeriodEndDate,
PeriodNum,
PeriodName,
PeriodDesc,
YearStartDate,
YearEndDate,
PeriodYearNum,
PeriodYearName,
PeriodYearDesc,
PeriodAdjustmentInd,
QuarterStartDate,
QuarterEndDate,
QuarterNum,
QuarterName,
QuarterDesc,
PeriodSetID,
PeriodSetName,
PeriodSetDesc
ORDER BY WeekKey) AS Row_Count
FROM DimWeek
)
select * from Ranks where Row_Count>1