Updated vendor batch SQL