本文介绍了如何在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中执行上述查询。



我该怎么办。帮助我。

解决方案

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.

解决方案


这篇关于如何在MsAccess DataBase中使用Pivot查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-02 15:33