[SQL Server 2008] Problem with Between syntax
Hi there, hope in your help.
In SQL server I have the column doTableDate set a Datetime.
I need extract all rows in on date range and I think use to syntax Between And
If try this version of query I have in output 889 rows all with date 2014-01-03... but I have other records with date 2014-01-04 in column doTableData...
SELECT
*
FROM
doTable
WHERE
doTableDate BETWEEN CONVERT (
datetime,
'03/01/2014 00:00:00',
103
)
AND CONVERT (
datetime,
'04/01/2014 00:00:00',
103
);
If try this version I don't have output no record, why?
The syntax Between And
not working in SQL Server?
Can you help me?
Thank you in advance.
SELECT
*
FROM
doTable
WHERE
doTableDate BETWEEN CONVERT (
datetime,
'03/01/2014 00:00:00',
103
)
AND CONVERT (
datetime,
'03/01/2014 00:00:00',
103
);