Ms-Access

如何在 MS Access 中將列轉換為行

  • April 23, 2020

請幫助我理解如何在 MS Access 中將列轉換為行。我有下表,我想轉換為下面的結果表。

NoOf_A NoOf_B NoOf_C NoOf_D
200    300    400    500

結果表:

Type_OfCValue  Total
NoOf_A          200  
NoOf_B          300
NoOf_C          400
NoOf_D          500

SELECT “NoOf_A” AS Type_ofCValue, NoOf_A AS

$$ Value $$從 T1 聯盟

SELECT “NoOf_B” AS Type_ofCValue, NoOf_B AS

$$ Value $$從 T1 聯盟

SELECT “NoOf_C” AS Type_ofCValue, NoOf_C AS

$$ Value $$從 T1 聯盟

SELECT “NoOf_D” AS Type_ofCValue, NoOf_D AS

$$ Value $$從 T1 出發;

引用自:https://dba.stackexchange.com/questions/265663