Results 1 to 3 of 3
  1. #1
    NelsonKauley is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    6

    Convert multiple rows to columns?

    Hey

    I have been beating my head against the wall trying to figure out a way to get this working. I have a total of 4 queries I am running to get various customer details from various tables.



    Most of the data I need is in a couple of tables with just 1 row per customer and I usually only need to grab a couple columns out of it. Now the problem I have run into is the table that stores what appliances the customer has on the plan links to a contract table via a Contract_id and then each individual appliance has it's own Appliance_id attached to the record. What happens is when I run the query it will give me say 9 rows with the same Contract_id along with all the customer info but then each row represents a different appliance. What I need to be able to do is take those individual appliances in their rows and convert them into columns so when I run the query it just gives me 1 row per customer but has the different appliances as columns in that row. This way I can use the data to do a mail merge. Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    You want to denormalize data and display across (horizontal, left to right, transpose) the page. This is not easy. Review:
    http://forums.aspfree.com/microsoft-...ry-322123.html
    http://allenbrowne.com/func-concat.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    NelsonKauley is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    6
    Hey thanks!!! My boss managed to break our system we currently use to make out confirmation and renewal letters. She asked me to look into setting up a way to do it thru access but it's no small feat.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 01-02-2012, 06:46 PM
  2. Replies: 5
    Last Post: 12-01-2011, 05:38 PM
  3. Unmatched with multiple columns and rows
    By sampson20 in forum Programming
    Replies: 1
    Last Post: 04-18-2011, 10:48 AM
  4. Replies: 6
    Last Post: 01-31-2011, 03:31 PM
  5. Replies: 1
    Last Post: 01-28-2011, 02:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums