Results 1 to 3 of 3
  1. #1
    rdy4trvl is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    2

    Convert Transactional Table into table in one step

    The goal is to provide a report of filled volunteer positions. An online web form provides an excel output volunteers and the jobs they selected. The excel consists of one column with the volunteer names and multiple columns of jobs available with the row filled under each job where the volunteer selected that job. So, I'd like a table with two columns - a job (filled) and the associated volunteer name.

    Click image for larger version. 

Name:	access.png 
Views:	2 
Size:	34.3 KB 
ID:	7062
    The only way I could do this is through multiple query and appends, one for each job. There must be an easier method. Could someone point me in the right direction.
    Thanks
    Attached Thumbnails Attached Thumbnails access.png  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930

    UNION query to normalize data

    You are importing or linking to the Excel?

    How many possible jobs are there? A UNION query could rearrange the data. There is a limit of 50 lines in a UNION. There is no query designer or wizard for UNION, must type in the SQL view editor of query designer. Also, VBA has issues with UNION queries.

    SELECT Volunteer, "Job1" As Job FROM tablename WHERE Not Job1 Is Null
    UNION SELECT Volunteer, "Job2" FROM tablename WHERE Not Job2 Is Null
    UNION SELECT Volunteer, "Job3" FROM tablename WHERE Not Job3 Is Null
    UNION SELECT Volunteer, "Job4" FROM tablename WHERE Not Job4 Is Null
    UNION SELECT Volunteer, "Job5" FROM tablename WHERE Not Job5 Is Null;
    Last edited by June7; 04-05-2012 at 04:02 PM.
    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
    rdy4trvl is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    2
    Works like a gem! I should have taken that SQL class. Huge thanks!!!

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

Similar Threads

  1. Convert VALUE in Textbox to CAPS in TABLE
    By taimysho0 in forum Programming
    Replies: 3
    Last Post: 12-30-2011, 05:04 PM
  2. step and step proccess
    By toochic in forum Programming
    Replies: 5
    Last Post: 10-09-2011, 09:34 AM
  3. Convert form to Table or Add Field to Table
    By jlclark4 in forum Forms
    Replies: 1
    Last Post: 12-15-2010, 01:52 PM
  4. Replies: 7
    Last Post: 11-13-2010, 08:08 AM
  5. Replies: 4
    Last Post: 04-29-2009, 04:59 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