Results 1 to 2 of 2
  1. #1
    accessprogram is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    14

    Database Design

    Hello,

    I am trying to design a new table that has 5 columns and first column is based on ID and second column is based on messages. the old table has 10 columns where first column is again ID and all other columns are showing messages related to this ID vertically. now I want to bring down all of the 10 columns messages into the new table 2 column but what happens is that first column has Id 1,2,3,4 and 2 column will now show messages related to Id 1 near ID 2,3,4,5 and 2 column will have more fields compare to ID, I want to match ID and multiple message related to the same Id like
    ID Errors
    1 error1
    1 erro2
    1 erro3
    1 erro5


    2 erro3
    2 erro3
    2 erro4
    2 erro5

    Please help me fixing this problem. how can the query be designed to sort the ID and grouping the messages related to matching ID?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can use a union query:

    SELECT ID, Error1
    FROM TableName
    WHERE Error1 Is Not Null
    UNION ALL
    SELECT ID, Error2
    FROM TableName
    WHERE Error2 Is Not Null
    UNION ALL
    ...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Database Design for Specification Database
    By khwaja in forum Database Design
    Replies: 2
    Last Post: 11-24-2011, 03:58 AM
  2. Database design - PLEASE HELP!
    By wanderliz in forum Database Design
    Replies: 1
    Last Post: 08-22-2010, 10:56 AM
  3. Database design help
    By DaveyJ in forum Database Design
    Replies: 7
    Last Post: 06-09-2010, 04:18 AM
  4. Database Design
    By mzrihe1x in forum Database Design
    Replies: 1
    Last Post: 06-17-2009, 09:09 PM
  5. Need help checking database design
    By abc7 in forum Database Design
    Replies: 1
    Last Post: 10-29-2007, 08:08 AM

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