$SQL .= ' IN (' . join(", ", @{$where{DocumentRef}{'-in'}}), ') ';