We have error - ERROR #5821: Cannot instantiate query: 'SQLCODE = -146, %msg = Error: '' is an invalid DISPLAY Date value' not able to see what is causing:

CASE When P.PatReltoGuar->Name = 'SELF' then P.Lnm Else Substring(P.GuarNmIfNotPat, 1,Charindex(',',P.GuarNmIfNotPat)-1) End as DemoGuarLastName,

CASE When P.PatReltoGuar->Name = 'SELF' then P.Fnm Else Substring(P.GuarNmIfNotPat,Charindex(',',P.GuarNmIfNotPat)+1,LEN(P.GuarNmIfNotPat)) End AS DemoGUARFIRSTNAME,

0 1
0 44