1 Reply Latest reply on Mar 25, 2013 10:25 AM by Jonathan Drummey

    Joining and Appending Data in the Same Extract

    Ellen Pfeiffer

      I want to join two tables, which is working fine. However one of them has too much data to fit into one sheet on Excel. So, I want to append multiple sheets of this table also. Is it possible to append tables that are being joined at the same time?

      If so, what would the code look like? I only know very basic SQL, and I'm not sure how to do this.


      This is what I have so far

      SELECT [Demographics$].[intChurchID] AS [intChurchID],

          [Demographics$].[dteSignup] AS [dteSignup]

          [Demographics$].[strName] AS [strName]

          ['Inv 1$'].[ChurchID] AS [ChurchID],

          ['Inv 1$'].[ChurchSignup] AS [ChurchSignup]

          ['Inv 1$'].[AcceptedDate] AS [AcceptedDate]

      FROM [Demographics$]


        INNER JOIN ['Inv 1$'] ON ([Demographics$].[intChurchID] = ['Inv 1$'].[ChurchID]) AND ([Demographics$].[dteSignup] = ['Inv 1$'].[ChurchSignup])


      And now I want to add a Union to append Sheet 'Inv 1' with 'Inv 2', which are identical except for the values.

        • 1. Re: Joining and Appending Data in the Same Extract
          Jonathan Drummey

          Hi Ellen,


          If you're still looking for help on this one then please post a sample Excel file, I'm not clear on what is going on with the Demographics worksheet. Is that something that needs to be joined to every additional sheet?


          Also, if you're running into the 65K row limit in Excel and are using Excel 2007 or later, if you create a new Excel worksheet in the .xlsx format then the limit is about 1.04 million rows.