Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Case When Null Date ISSUE (Challenge)

$
0
0
:rolleyes:I have a table where the date has a null value it displays null. I am updating the field to '' where it's null. However it defaults to a
'1900-01-01 00:00:00.000' value. To correct this I used.

Select CUSTOMERNUMBER,
CASE WHEN Medical_Record='1900-01-01 00:00:00:000' THEN '' ELSE CAST(Medical_Record AS varchar(32)) END
, Logbook
From Finance.dbo.temp_EDPScanned
Where Medical_Record >= CreateDate or Logbook >=CreateDate

GROUP BY CUSTOMERNUMBER,Medical_Record,Logbook

The Result is Aug 29 2012 12:00AM

When creating a report in SSRS or excel it will not format to a date. Is there any way to get around this? I have looked evrywhere.

Viewing all articles
Browse latest Browse all 13329

Trending Articles