INSERT salesanalysis ( typeabbrev,
												periodno,
												amt,
												cost,
												cust,
												custbranch,
												qty,
												disc,
												stockid,
												area,
												budgetoractual,
												salesperson,
												stkcategory)
										SELECT 'DE',
												'93',
												'-281.6',
												'0',
												'TM080',
												'R031',
												'-12.8',
												'0',
												'BN',
												custbranch.area,
												1,
												'fe',
												stockmaster.categoryid
										FROM stockmaster,
												custbranch
										WHERE stockmaster.stockid = 'BN'
										AND custbranch.debtorno = 'TM080'
										AND custbranch.branchcode='R031'