3
Answers

Select query problem for dates between different ranges

soumya shanbhag

soumya shanbhag

14y
4.9k
1
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)