IF (SELECT COUNT(0) FROM seasonalproduct WHERE hq_product_id = 36231) = 0 BEGIN INSERT INTO seasonalproduct(hq_product_id, frommonth, tomonth) VALUES(36231,10,2) END