Date range question

  • You should be able to get the overlap using this (DDL and sample data would help)

    select startYear,

    endYear,

    .

    .

    from Contracts

    where MAXYEAR >= startYear

    and MINYEAR =< endYear

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537
  • That's it !!! Thanks a million Mark.

    This is exactly what I need.

Viewing 2 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply