I'm using SQL Server 2000 and my ERP vendor has used a Text datatype field to hold Dates.
The Dates look like:
6/21/2001
However, some of them are blank.
I've tried using something like:
select coalesce(nullif(fdelivery, ''), '1/1/1900') FROM sorels
to remove the blanks to no avail.
I've also tried:
case
when ltrim(rtrim(SOR.fdelivery)) = ''
to remove blanks to no avail.
Even if I can substitute the blanks with something that looks like a date, how can I convert or cast the field to be datetime (from Text) so that my reporting program knows that it is in fact a Date field and not Text.