SELECT collections1.bankname, collections1.portfolio, collections1.companyid ,; SUM(IIF(NOT EMPTY(collections1.settdate), 1, 0)) AS tot_col, ; SUM(IIF(INLIST(trancode, '21', '22', '31', '32'), collections1.amount, 0000000000.00)) AS nCredit, ; SUM(IIF(INLIST(trancode, '21', '22', '31', '32'), 1, 0)) AS nCreditnum, ; SUM(IIF(INLIST(trancode, '26', '27', '36'), collections1.amount, 0000000000.00)) AS nDebit, ; SUM(IIF(INLIST(trancode, '26', '27', '36'), 1, 0)) AS nDebit_num ; FROM collections1 ; WHERE collections1.portfolio = cBank ; GROUP BY collections1.companyid ; INTO TABLE c:\dis_collections *COPY TO mis_collections TYPE XL5 USE IN dis_collections USE IN collections1 SELECT dis_collections.*, companyid.bankname AS bank, companyid.companyid AS newid ; FROM FORCE dis_collections LEFT OUTER JOIN \\Svrpc-stlmnt01\e\RETURN-Items\DATA\companyid ; ON ALLTRIM(dis_collections.companyid) == ALLTRIM(companyid.companyid) ; ORDER BY dis_collections.bankname ; INTO TABLE dis_collections1 USE IN dis_collections USE IN dis_collections1 USE IN companyid USE dis_collections1 IN 0 SELECT dis_collections1 SCAN REPLACE bank WITH bankname FOR ISNULL(bank) REPLACE bank WITH "KEY" FOR bankname = "KEY" REPLACE bank WITH "UMB" FOR bankname = "UMB" REPLACE bank WITH "ZIONS" FOR bankname = "ZIONS" ENDSCAN GO TOP COPY TO c:\dis_collections1 TYPE XL5 USE IN dis_collections1I need to do this for 4 other tables. I will then combine them into on table. IS there an easy way to get all this information in one SELECT and combine them later?