INSERT INTO salesanalysis (typeabbrev,
								periodno,
								amt,
								cost,
								cust,
								custbranch,
								qty,
								disc,
								stockid,
								area,
								budgetoractual,
								salesperson,
								stkcategory)
						SELECT 'DE',
							'93',
							'-168',
							'0',
							'TM013',
							'41',
							'-12',
							'0',
							'BF',
							custbranch.area,
							1,
							'fe',
							stockmaster.categoryid
						FROM stockmaster,
							custbranch
						WHERE stockmaster.stockid = 'BF'
						AND custbranch.debtorno = 'TM013'
						AND custbranch.branchcode='41'