Microsoft Access Pivot表到SQL Server数据透视表

时间:2015-07-21 14:04:03

标签: sql sql-server ms-access pivot

我是SQL Server新手,需要将以下MS Access Pivot查询转换为SQL Pivot Query。任何帮助将不胜感激。

TRANSFORM First(msdgen_pmcat_document_extract_mats.document_text) AS FirstOfdocument_text
SELECT msdgen_pmcat_document_extract_mats.material_id, msdgen_pmcat_document_extract_mats.documentobject_name, msdgen_pmcat_document_extract_mats.regulatory_code, msdgen_pmcat_document_extract_mats.alternate_name
FROM msdgen_pmcat_document_extract_mats
GROUP BY msdgen_pmcat_document_extract_mats.material_id, msdgen_pmcat_document_extract_mats.documentobject_name, msdgen_pmcat_document_extract_mats.regulatory_code, msdgen_pmcat_document_extract_mats.alternate_name
PIVOT msdgen_pmcat_document_extract_mats.data_type_code;

1 个答案:

答案 0 :(得分:-1)

简单搜索“MS SQL PIVOT”将为您提供所需的所有帮助:

https://technet.microsoft.com/en-US/library/ms177410(v=SQL.105).aspx

相关问题