update t1 set t1.BPTProductId=t2.BPTIdfrom Bas_ProductImageUrl t1join Bas_Products t2on t1.BPTBarCode=t2.BPTBarCode