I am trying to get the date component in this query. How can I create a query that is the most efficient?
UPDATE myTable
WHERE
[DateTime] = @DateTime
AND
I am trying to get the date component in this query. How can I create a query that is the most efficient?
UPDATE myTable
WHERE
[DateTime] = @DateTime
AND
SQL 2008 has a DATE datatype:
CAST(@DateTime AS DATE)
I cannot put it in better context without more of your UPDATE
statement