INSERT INTO stockcheckfreeze (stockid,
										  loccode,
										  qoh,
										  stockcheckdate)
					   SELECT locstock.stockid,
							  locstock.loccode,
							  locstock.quantity,
							  '2018-06-05'
					   FROM locstock,
							stockmaster
					   WHERE locstock.stockid=stockmaster.stockid 
					   AND locstock.loccode='3' 
					   AND stockmaster.categoryid IN ('CHICKEN')
					   AND stockmaster.mbflag!='A' 
					   AND stockmaster.mbflag!='K' 
					   AND stockmaster.mbflag!='D'