INSERT INTO salesanalysis (typeabbrev,
								periodno,
								amt,
								cost,
								cust,
								custbranch,
								qty,
								disc,
								stockid,
								area,
								budgetoractual,
								salesperson,
								stkcategory)
						SELECT 'DE',
							'94',
							'-480',
							'0',
							'TM002',
							'1',
							'-30',
							'0',
							'LCPS',
							custbranch.area,
							1,
							'fe',
							stockmaster.categoryid
						FROM stockmaster,
							custbranch
						WHERE stockmaster.stockid = 'LCPS'
						AND custbranch.debtorno = 'TM002'
						AND custbranch.branchcode='1'