Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33

    Transpose Data

    Hi,

    I have a table which contain data in single column. i want to transpose data to this.

    This is the data which i have
    Name
    Robin
    Mark


    Sydney
    Karun


    then I need

    Name Robin Mark Sydney Karun

    Thank u for ur great time spend in this post...

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    How many names are in the column? Why do you need to do this?
    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
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Echoing June's Question. But in the meantime, I found this code you could use.

    http://access-4suc6.blogspot.com/200...umns-into.html

  4. #4
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Thank you Guys. If its possible in Query....

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Your requirement isn't making sense. Is the example you show what you want as a row of data?

    A CROSSTAB query requires data source with at least 2 fields.

    A SELECT query would be like:
    SELECT "NAME" As F1, "Robin" As F2, "Mark" As F3, "Sydney" As F4, "Karun" As F5 FROM tablename;

    Otherwise, will need VBA code.

    Again, how many names are there and why do you need this?
    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.

  6. #6
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Hi

    Thank u june7 for ur reply. But in this i have set of data like this
    Name
    (1)
    Robin
    Mark
    Sydney
    Karun

    (2)
    james
    Victor
    Kallis
    Franklin.................

    Thank u for ur valuable time spend in this post

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    I don't understand data structure. What do (1) and (2) mean? I still don't know what you are trying to accomplish nor why.
    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.

  8. #8
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Hi,

    Transpose Column To Row

    Input Data
    Supplier 1 2 3
    a


    b


    c


    d






    e


    f


    g


    h



    Output
    Supplier 1 2 3
    a b c d
    e f g h

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Still doesn't make sense. What criteria determines that a,b,c,d should be one record and e,f,g,h in another?

    I doubt what you want can be done with a query alone and that VBA code will be needed.

    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.

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Can you tell us in a couple of sentences what your database is about, and why you need the structure you do? There may be some options.

    Your question and responses don't say much, but it doesn't look like a relational database requirement.
    Last edited by orange; 02-25-2013 at 07:46 PM.

  11. #11
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Hi,

    Thank u for reply.

    For Example;
    I copy Address from website and paste into excel. The address save in three columns. Each n Every time i want cut n copy the data n paste into the row. i want to take lot of data. So, "it will click" it reduce my time wasting in that cut n paste from column to row.

    Like this
    Contact:
    Asante Shakuur
    Associate Director of Development and External Relations
    (301)405-8189


    Contact:
    Carrie Hilmer
    Coordinator for External Relations
    (301)405-4471

    Ouput
    Contact: Asante Shakuur Associate Director of Development and External Relations (301)405-8189

    Contact: Carrie Hilmer Coordinator for External Relations (301)405-4471


    Thank U for UR Time Spending int this post....

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    You say address is in three columns, however, your data sample reflects one column. This data cannot be rotated by query alone. Will require VBA code. Refer to links in previous post.
    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.

  13. #13
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Since you have the data in Excel, why not transpose the data there before you bring it into Access

    Look here for a quick to develop Excel Macro that I believe will accomplish what you are trying to do.
    Attached Files Attached Files

  14. #14
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    In addition to Alan's suggestion, look at CONCATENATE in Excel.

    Thanks

  15. #15
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Hi,

    Thank u for ur reply. Ya, Ur suggestions is good but i'm not familiar with excel macro. So, can u help on access it will helpful to me.


    Thank u

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Transpose specific records to table (VBA)
    By KP_SoCal in forum Programming
    Replies: 2
    Last Post: 02-27-2013, 09:31 PM
  2. Transpose Data
    By Ray67 in forum Database Design
    Replies: 10
    Last Post: 08-07-2012, 06:18 PM
  3. Query to transpose Data in Columns to Rows
    By ace1259 in forum Access
    Replies: 2
    Last Post: 04-10-2012, 01:49 PM
  4. Transpose data in MS Access
    By JBLoafer in forum Access
    Replies: 12
    Last Post: 03-05-2012, 02:45 PM
  5. Replies: 3
    Last Post: 06-20-2011, 03:09 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