sql - Results missing data between two dates with BETWEEEN or >= and <= -
starting with...
set @datefrom = '2014-04-01' set @dateto = '2014-10-01'
..., trying query next filters:
c.datecreate between @datefrom , @dateto)
or
c.datecreate >= @datefrom , c.datecreate <= @dateto
both homecoming same result set, not include current month's (october's) data.
i want info october. apparently setting. there workaround accomplish please?
if want oct , want utilize limits, recommend:
c.datecreate >= @datefrom , c.datecreate < dateadd(month, 1, @dateto)
sql sql-server sql-server-2008 tsql datetime
No comments:
Post a Comment