Results 1 to 3 of 3
  1. #1
    humanmaycry is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    4

    Access DATA Manipulation issue

    I right now have a table like this:



    Name PPgroup FINgroup COURSE Course_Stream
    Chris pp-ny1 cm-ny2 PPcourse1 PP
    Chris pp-ny1 cm-ny2 CMcourse1 CM

    As you can see, Chris has belongs to 2 groups, 1 is pp-ny1 and the other is cm-ny2; Course is the courses Chris chosen and Course_stream represents the stream of Course belong to.

    I want to turn the 2 groups as one; as you can see course stream is related to the group. so the result I want is:

    Name Group Course Course_stream
    Chris pp-ny1 PPcourse1 PP
    Chris cm-ny2 CMcourse2 CM

    Thanks for your help.

    Regarfds

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Why are you storing the PP group and FIN group on the two different records if you don't want to see the data that way?


    I can't think of a way to do this other than a union query

    something like
    (note I'm changing your NAME field to PERSONNAME and taking out spaces in your field names, NAME is a reserved word and will probably cause you problems with programming as will spaces, special characters and other reserved words)

    SELECT PersonName, PPGroup as GROUPNAME, Course, Course_Stream FROM <TableName> WHERE ((Course_Stream) = 'PP')
    UNIION ALL
    SELCT PersonName, FINGroup as GROUPNAME, Course, Course_Stream FROM <Tablename> WHERE ((Course_Stream = 'CM')

  3. #3
    humanmaycry is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    4
    Thanks so much, this really helps.
    The data was imported from excel, so you know how bizarre the data can be!

    Thanks a lot.

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

Similar Threads

  1. Form output data manipulation
    By bearsgone in forum Forms
    Replies: 1
    Last Post: 04-05-2011, 04:21 PM
  2. Form manipulation error
    By witooldas in forum Forms
    Replies: 6
    Last Post: 03-18-2011, 02:40 AM
  3. date manipulation
    By lpsd in forum Access
    Replies: 3
    Last Post: 12-23-2010, 12:06 PM
  4. Form Manipulation examples
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-24-2010, 12:03 AM
  5. Query manipulation using VBA
    By benattal in forum Programming
    Replies: 0
    Last Post: 12-31-2008, 09:12 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