Select query problem for dates between different ranges

Dec 30 2009 4:14 AM
hi,
    I am getting problem while selecting records for below mentioned  query.

Select Min(TotalAvalablity) as TotalAvalablity from htl_FDRoomAvailability where  REPLACE(CONVERT(varchar(50),ReserveDate, 101), ' ', '-')>='12/31/2009' and REPLACE(CONVERT(varchar(50),ReserveDate, 101), ' ', '-')<='01/01/2010'

Please any one help me why its showing null.If ReserveDate is between same year then its giving correct result.


Thanks,
Soumya




Answers (3)