$PTName =~ s/,/','/g; if ($PTName) { $Where = $Where . "AND E.PT_name IN ANY ($PTName) "; }