Convert Column to Rows in Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Samadhanksagar
    New Member
    • Jun 2014
    • 1

    #1

    Convert Column to Rows in Access

    Hello,
    I want to convert column into rows in SharePoint 2013.
    I have tried by using pivot /U n Pivot , but still i have got n Issue.

    please see the following Command I have written in access database.

    Code:
    SELECT  [Case Number], [Author 1], [Author 2], [Author 3]
    FROM 
       (
    SELECT   [Case Number], [Author 1], [Author 2], [Author 3]
    FROM [Gold Metadata]
    ) 
    UNPIVOT
       (Orders FOR [Gold Metadata] IN 
          ( [Author 1], [Author 2], [Author 3])
    )AS unpvt;
    GO


    Please give me any solution on it

    Thanks ,
    Samadhan Kshirsagar
    Last edited by Rabbit; Jun 9 '14, 06:01 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    They removed pivottables from Access in Office2013
    (link: http://answers.microsoft.com/en-us/o...9-5215e0887aff

    Comment

    • twinnyfo
      Recognized Expert Moderator Specialist
      • Nov 2011
      • 3665

      #3
      Samadhan,

      What is the purpose of converting Columns to Rows? This is similar to saying that a Field is equivalent to a Record and vice versa, which is definitely not the case in Access.

      It's difficult to follow from your post exactly what you want to do, what the beginning data looks like and what your completed data needs to look like. If we had more information we can help guide you to a proper solution.

      Thanks!

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Please use code tags when posting code or formatted data.

        Access doesn't have an UNPIVOT. You need to use a series of UNION ALL queries.

        Comment

        • zmbd
          Recognized Expert Moderator Expert
          • Mar 2012
          • 5501

          #5
          Twinny, ( guessing here (^_^) )

          Most likely OP is after a form of de-normalization such as I have to to do quite often for presentations for example:
          Code:
                     Iron   Copper       Arsenic
          sample1    0.03   BLDL(<0.01)  BLDL(<0.001)
          sample2    0.03   BLDL(<0.01)  BLDL(<0.001)
          sample3    0.03   BLDL(<0.01)  BLDL(<0.001)
          etc...
          I am sure you can see how this would be normalized
          (ie: [Tbl_results]!{[FK_Sample],[FK_Analyte],[TestResult]} )

          This isn't always very easy to do, even with a cross-tab (or with a pivot which as pointed out earlier are no-longer available in Access2013:
          (-) Access 2013 depreciated features
          (-) SharePoint 2013 depreciated features)

          If the union query wonts work then, I'm afraid that OP is going to have create a SP-List using Access-Macro (YUCK) that reads the field values of interest ( author? ), writes these as the SP-List header and then creates the row entries...

          would be nice to see an example of the current data and how OP wants the data.

          Comment

          Working...