Replace original query as that will only work if you have 20 or less vendors