• Add a NULLIF(patindex, 0).

    NULL -1 => NULL

    LEFT ('string', NULL) doesn't die on you.