You are on page 1of 1

insert into #Rpt_cash (Type_code ,Tran_amt, tran_amt2, Tran_qty,tran_cat,

tran_type, tran_desc, key_code, price_type) (Select type_code, SUM(tran_amt)


tamt, SUM(tran_amt2), Sum(tran_qty) tqty, tran_cat, tran_type, tran_desc, key_code,
price_type From bill_Tran where mech_no = @machine_no and bill_date between
@entry_date and @to_date GROUP BY type_code, tran_cat, tran_type, tran_desc,
key_code, price_type )
insert into #temp (Type_code ,Tran_amt, tran_amt2, tran_qty,tran_cat,
tran_type, mech_no, clerk_code, key_code, price_type) (Select type_code,
tran_amt, tran_amt2 ,tran_qty, tran_cat, tran_type, mech_no, clrk_code,key_code,
price_type From bill_tran where mech_no = @machine_no AND bill_date between
@entry_date and @to_date)

You might also like