New answers tagged

0

@bbaird gave a working solution in this DbFiddle. As per my comment to my question I have decided to return the day durations and do the nested summation in code as it will be a very few simple lines.


5

The NEWID() function is not known for certain by the compiler to always return a value (even though you and I know that), so the only way to fix this is to use ISNULL again ISNULL(ISNULL(Anchor.[Guid], NEWID()), CAST(0x0 AS uniqueidentifier)) The last parameter never actually gets executed. Obviously, if you don't actually need NEWID() then you can just use ...


Top 50 recent answers are included