如何在MsAccess DataBase中使用Pivot查询 [英] How to use Pivot query in MsAccess DataBase
本文介绍了如何在MsAccess DataBase中使用Pivot查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
sql查询如下;
select * FROM Tb_SCh_TIme_Table P PIVOT(MAX(Faculty_Code)FOR Session IN([1] ,[2],[3],[4]))AS PVT
当然是订单;
当我跑在sql server中执行的结果工作正常。
在MsAccess DataBase中执行相同的查询显示错误如下;
select * FROM Tb_SCh_TIme_Table P PIVOT(MAX(Faculty_Code)FOR Session IN([1],[2],[3],[4]))AS PVT
order当然;
FROM子句中的语法错误。
如何在MsAccess DataBase中执行上述查询。
我该怎么办。帮助我。
解决方案
检查下面论坛中的答案,你可以使用这种方法
http://stackoverflow.com/questions/6571470/ms-access-2010-sq l-query-help [ ^ ]
http://www.fmsinc.com/tpapers /queries/crosstab.html [ ^
sql query as follows;
select * FROM Tb_SCh_TIme_Table P PIVOT (MAX(Faculty_Code) FOR Session IN ([1],[2],[3] ,[4])) AS PVT
order by course;
when i run results executed in sql server working fine.
The same query execute in MsAccess DataBase show the error as follows;
select * FROM Tb_SCh_TIme_Table P PIVOT (MAX(Faculty_Code) FOR Session IN ([1],[2],[3] ,[4])) AS PVT
order by course;
Syntax error in FROM Clause.
how can i execute the above query in MsAccess DataBase.
how can i do.help me.
解决方案
Check the answer in below forum, you can use this type of method
http://stackoverflow.com/questions/6571470/ms-access-2010-sql-query-help[^]
http://www.fmsinc.com/tpapers/queries/crosstab.html[^]
这篇关于如何在MsAccess DataBase中使用Pivot查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文