Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6533151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:05:26+00:00 2026-05-25T10:05:26+00:00

UNPIVOT is available in MS SQL-Server 2005, but AFAIK not in MS Access 2010.

  • 0

UNPIVOT is available in MS SQL-Server 2005, but AFAIK not in MS Access 2010. How can it be implemented with on-board means? For example, I have a table

ID | A | B | C | Key 1 | Key 2 | Key 3
---------------------------------------
 1 | x | y | z |     3 |   199 |   452
 2 | x | y | z |    57 |   234 |   452

and want to have a table like

ID | A | B | C | Key
--------------------
 1 | x | y | z |   3
 2 | x | y | z |  57
 1 | x | y | z | 199
 2 | x | y | z | 234
 2 | x | y | z | 452

Key 452 is a special case. Currently I do the rotation in OLEDB/ATL C++. Although it is fast enough I’m still curious. What is the most efficient SQL statement for Access 2010 here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:05:27+00:00Added an answer on May 25, 2026 at 10:05 am

    This query …

    SELECT ID, A, B, C, [Key 1] AS key_field
    FROM tblUnpivotSource
    UNION ALL
    SELECT ID, A, B, C, [Key 2] AS key_field
    FROM tblUnpivotSource
    UNION ALL
    SELECT ID, A, B, C, [Key 3] AS key_field
    FROM tblUnpivotSource;
    

    … returns this recordset (using your sample table values as tblUnpivotSource) …

    ID A B C key_field
    -- - - - ---------
     1 x y z         3
     2 x y z        57
     1 x y z       199
     2 x y z       234
     1 x y z       452
     2 x y z       452
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can you make pivot/unpivot in mysql similar to ms sql server? thanks Here's a
Given the following table in SQL Server 2005: ID Col1 Col2 Col3 -- ----
How can I 'unpivot' a table? What is the proper technical term for this?
I've got a sql query (using MS-SQL 2005) that generates data with these columns:
I am trying to find the syntax for inserting the results from an UNPIVOT
We work with some very large databases (300Gb - 1Tb). Tables can contain from
Sorry I know similar question have been asked many times before but like most
for this , i have many UNION ALL and how to use unpivot same
Using SQL, how do I convert a single row table like this... Firstname Surname
EDIT This question has been closed on SO and reposted on ServerFault https://serverfault.com/questions/333168/how-can-i-make-my-ssis-process-consume-more-resources-and-run-faster I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.