• Not sure if I am overlooking this, the last 'ON' cluase is,

    ON c.ID = t1.ClaimID

    Dont you think it should be tli1 instead of t1 in t1.ClaimID?

    Ohh sorry, you cant use that t1.claimID directrly in ON clause. Give an alias for that and then use it in here!

    ---------------------------------------------------------------------------------