I have this stored procedure where I want to add the iCnt field from rpt 2 and 4 and make those results rpt 5. How can I add it to this stored procedure or would it be best to put the info into a temp file then add the fields afterwards to get report 5. I hope all makes senseI have to add the iCnt fields of the rib(rpt 2) and spouse (rpt4) to get rib/spouse (rpt 5)--nation Rib totalsSelect Sort='1',Reg='NAT', Region='0', Area='00', Dist = '000', Doc = '000', convert(char,d.mnth_endt,1) as DowrDt, iCnt, ncnt, rpt='2' From (select mnth_endt, sum(zip_count) as iCnt from [dbo].[iClaimsTemp1] where typ_of_actn='a' and abap_prc_cd NOT IN('y','s') and Bicnum IN('002','010') and inet_ind = '1'Group by mnth_endt)aright join(select mnth_endt, sum(zip_count) as ncnt from [dbo].[iClaimsTemp1] Where typ_of_actn = 'a' and Bicnum = '002' and inet_ind = 'n' and abap_prc_cd NOT IN('y','s')Group by mnth_endt)bon a.mnth_endt = b.mnth_endt--nation totals - spouse insert iClaims1Select Sort='1',Reg='NAT', Region='0', Area='00', Dist = '000', Doc = '000', convert(char,h.mnth_endt,1) as DowrDt, iCnt, ncnt, rpt='4' From (select mnth_endt, sum(zip_count) as iCnt from [dbo].[iClaimsTemp1] Where typ_of_actn='a' and Bicnum in ('003', '004') and inet_ind='4'Group by mnth_endt)cright join(select mnth_endt, sum(zip_count) as ncnt from [dbo].[iClaimsTemp1] where (Typ_Of_Actn = 'A' and Bicnum In ( '003' , '004') and Inet_Ind = 'N')Group by mnth_endt)don c.mnth_endt = d.mnth_endt--nation totals - rib/spouseinsert iClaims1 Select Sort='1',Reg='NAT', Region='0', Area='00', Dist = '000', Doc = '000', convert(char,hh.mnth_endt,1) as DowrDt, iCnt, ncnt, rpt='5' From (select mnth_endt, sum(zip_count) as iCnt from [dbo].[iClaimsTemp1] [/b]What would I put here to get the totals of rpt 2 and rpt 4 to get rpt 5?[/b]Group by mnth_endt)eright join(select mnth_endt, sum(zip_count) as ncnt from [dbo].[iClaimsTemp1] where (bicnum = '002' or bicnum = '202' or bicnum = '003' or bicnum = '004' or bicnum = '203' or bicnum = '204') and reg is not null and area is not null Group by mnth_endt)fon e.mnth_endt = f.mnth_endtHere's some data from the table:CREATE TABLE [dbo].[TblA]( [Sort] [varchar](1) NOT NULL, [Reg] [varchar](3) NOT NULL, [Region] [varchar](1) NOT NULL, [Area] [varchar](2) NOT NULL, [Dist] [varchar](3) NULL, [Doc] [varchar](3) NOT NULL, [DowrDt] [smalldatetime] NULL, [iCnt] [int] NULL, [rpt] [varchar](1) NOT NULL) ON [PRIMARY]insert into TblAselect '1', 'NAT', '0', '00', '000', '000', '11/26/2010','24', '1' union allselect '1', 'NAT', '0', '00', '000', '000', '12/24/2010','24', '1' union allselect '1', 'NAT', '0', '00', '000', '000', '01/28/2011','56', '1' union allselect '1', 'NAT', '0', '00', '000', '000', '11/26/2010','24', '2' union allselect '1', 'NAT', '0', '00', '000', '000', '12/24/2010','59', '2' union allselect '1', 'NAT', '0', '00', '000', '000', '01/28/2011','24', '2' union allselect '1', 'NAT', '0', '00', '000', '000', '11/26/2010','56', '3' union allselect '1', 'NAT', '0', '00', '000', '000', '12/24/2010','99', '3' union allselect '1', 'NAT', '0', '00', '000', '000', '01/28/2011','36', '3' union allselect '1', 'NAT', '0', '00', '000', '000', '11/26/2010','56', '4' union allselect '1', 'NAT', '0', '00', '000', '000', '12/24/2010','78', '4' union allselect '1', 'NAT', '0', '00', '000', '000', '01/28/2011','23', '4'