在MS Access 2013中将列转换为行

问题描述:

你好,
我想在Access 2013中将列转换为行.
我已经尝试过使用数据透视/U n Pivot,但是仍然出现问题.

请参阅我在访问数据库中编写的以下命令.

Hello,
I want to convert column into rows in Access 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.

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




请给我任何解决方案

谢谢,
Samadhan Kshirsagar




Please give me any solution on it

Thanks ,
Samadhan Kshirsagar

Hello Samadhan,
如果您使用的是MS Access,则可以选择UNION来实现您的目标.

检查这些链接

http://www.dbforums.com/microsoft-access/1634393-any-way-convert-columns-rows-see-inside-example.html [ http://stackoverflow.com/questions/20227458/将列名称转换为使用中的行字段 [
Hello Samadhan,
If you are using MS Access you can choose UNION to achieve your goal.

Check these links

http://www.dbforums.com/microsoft-access/1634393-any-way-convert-columns-rows-see-inside-example.html[^]

http://stackoverflow.com/questions/20227458/converting-column-names-to-use-as-row-fields-in-access[^]

All the Best:)