0

Please help me to understand, how to convert columns to rows in MS Access. I have the below table, I would like to convert as the below result table.

NoOf_A NoOf_B NoOf_C NoOf_D
200    300    400    500

Result Table:

Type_OfCValue  Total
NoOf_A          200  
NoOf_B          300
NoOf_C          400
NoOf_D          500

2

1 Answer 1

0

SELECT "NoOf_A" AS Type_ofCValue, NoOf_A AS [Value] FROM T1

UNION

SELECT "NoOf_B" AS Type_ofCValue, NoOf_B AS [Value] FROM T1

UNION

SELECT "NoOf_C" AS Type_ofCValue, NoOf_C AS [Value] FROM T1

UNION

SELECT "NoOf_D" AS Type_ofCValue, NoOf_D AS [Value] FROM T1;

1
  • Hello, thank you so much, you are a very professional person. I have accepted the answer.
    – KCR
    Apr 24, 2020 at 5:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.