Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Invalid Dates to Avoid Refresh Failure

Does anyone know how to handle invalid dates to avoid refresh failure?

CREATE VIEW DW.vwOpenOrders
AS
SELECT 
   Column1
  ,Column2
  ,Calendar_Date = CASE WHEN LEFT(CONVERT(CHAR(10), Calendar_Date), 2) IN('19','20') THEN Calendar_Date ELSE NULL END
FROM DW.OpenOrders

I used this code but it didn't help. Can anyone help me with some other method?

Help would be appreciated.

Regards,

Lewis

1 Reply