J
JEM
Help! I don't understand why I am getting the error message:
"Implicit conversion from datatype datetime to int is not allowed. Use
the CONVERT function to run this query."
I am using parameters to find records in a range of dates in a
function. Below is the simplified version of the SQL.
SELECT dbo.tblAuctions.EntityID, dbo.tblAuctions.AuctionDate,
dbo.tblAuctions.DueDate,
FROM dbo.tblEntities INNER JOIN dbo.tblAuctions ON
dbo.tblEntities.EntityID = dbo.tblAuctions.EntityID
WHERE (dbo.tblAuctions.EntityID = @entityid) AND
(dbo.tblAuctions.AuctionDate) BETWEEN @date1 AND @date2
When i enter in specific dates (Between 01/01/06 and 12/31/06) it runs
fine, but as soon as i change the dates into the parameters (Between
@date1 and @date2), i get the error message. I even tried using
CONVERT(DATETIME, @date1, 102)) to no avail.
Any ideas?
Thanks!!!
Jenn
"Implicit conversion from datatype datetime to int is not allowed. Use
the CONVERT function to run this query."
I am using parameters to find records in a range of dates in a
function. Below is the simplified version of the SQL.
SELECT dbo.tblAuctions.EntityID, dbo.tblAuctions.AuctionDate,
dbo.tblAuctions.DueDate,
FROM dbo.tblEntities INNER JOIN dbo.tblAuctions ON
dbo.tblEntities.EntityID = dbo.tblAuctions.EntityID
WHERE (dbo.tblAuctions.EntityID = @entityid) AND
(dbo.tblAuctions.AuctionDate) BETWEEN @date1 AND @date2
When i enter in specific dates (Between 01/01/06 and 12/31/06) it runs
fine, but as soon as i change the dates into the parameters (Between
@date1 and @date2), i get the error message. I even tried using
CONVERT(DATETIME, @date1, 102)) to no avail.
Any ideas?
Thanks!!!
Jenn