Hi,
We have a view, below is the definition of the view
SELECT A.column1, A.column2, A.column3, A.column4, A.column5, A.column6,
A.columnDate,A.column7,
B.column8
FROM dbo.TestTable AS A CROSS JOIN
(SELECT 'Delete' AS column8) AS B
WHERE (DATEDIFF(day, A.columnDate, GETDATE()) <= 1)
when executed this query of the view, encountered the error as "The conversion of a char data type to a datetime data type resulted in an out-of-range datetime"
The columnDate in table has a datatype of varchar(50) and same in view as well.
Without WHERE CLAUSE the query is working fine.
could you please check this issue and let me know how to resolve this problem.