I want to use a case statement where my logic determines a date. If the value returned is a null value I instead want to display ‘none’ instead of a null value.
See code below.
CASE WHEN DATEDIFF(d, vso.pod_ata, ISNULL(cncr.cntr_date3, GETUTCDATE())) - 14 > 0 THEN vso.pod_ata + 14
ELSE CONVERT(NVARCHAR(10), 'none')
END AS 'start_dem',
SQL SERVER was complaining about conversion so I tried converting it to nvarchar but thats not working. Does anyone know a good solution for this?
SQL, to my knowledge, does not allow mixed datatypes in the same column. Convert the
vso.pod_ata + 14to anNVARCHARas well.