Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    London, United Kingdom
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Union queries with Crosstab queries (2000)

    I have two crosstab queries and I want to join the recordsets together as a union query. The two crosstabs work fine independently, however, as soon as I do a union on them the sql no longer works.
    Is it possible to do a union query with two crosstab/transform queries?

    Many thanks
    Amanda

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Union queries with Crosstab queries (2000)

    What do you mean by "the sql no longer works", does it raise an error, does it return no records?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Union queries with Crosstab queries (2000)

    The number and names of the columns in a crosstab can vary depending on the source data. This may cause problems in a union query based on crosstab queries. It would help if you provided more information, as suggested by Pat.

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Union queries with Crosstab queries (2000)

    Can you instead construct a union query to join the two raw data sets togehter, then build a crosstab on the result.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •