How to check record exists before INSERT multiple records