DP-721271 (7/6/2010)
.../* Tried the following as well*/
IF @vchtstsirdt IS NULL
SET @vchtstsirdt = CONVERT(datetime, ISNULL(@vchtstsirdt,''))
Else
SET @vchtstsirdt = CONVERT(datetime, @vchtstsirdt)
...
That is also code noodles, but with different result.
NULL values will be converted to 1 Jan 1900
🙂
And there is very simple explanation for the error you getting:
Conversion failes due to some of values yuo have cannot be converted to datetime 😀
Looking your code I also suspect that you don't really need a cursor :w00t:.