2
嗨我想將一些訪問SQL查詢轉換爲MySQL查詢,並讓它一個凹凸,因爲我不確定如何轉換這些代碼。有人請幫忙。轉換訪問SQL到MySQL
1.
SELECT Notices.Promoter,
Sum(IIf([Notices].[Notice Type]='GRANT PERMIT' Or [Notices].[Notice Type]='GRANT VARIATION' Or [Notices].[Notice Type]='GRANT PAA',1,0)) AS Granted,
Sum(IIf([Notices].[Notice Type]='REFUSE APPLICATION',1,0)) AS Refused,
Sum(IIf([Notices].[Permit Status]='Deemed',1,0)) AS Deemed
FROM Notices
GROUP BY Notices.Promoter;
2.
SELECT [Notices].Promoter,
Sum(IIf([Notices].[Notice Type]='VARIATION',1,0)) AS Variation,
Sum(IIf([Notices].[Notice Type]='TWO HOURS AFTER',1,0)) AS [Two Hours After],
Sum(IIf([Notices].[Notice Type]='THREE MONTHS',1,0)) AS [Three Months],
Sum(IIf([Notices].[Notice Type]='THREE DAY',1,0)) AS [Three Day],
Sum(IIf([Notices].[Notice Type]='TEN DAY',1,0)) AS [Ten Day]
FROM Notices
GROUP BY [Notices].Promoter;
Access數據庫和MySQL數據庫中標記相同我只需要在覆蓋這兩個讓我有同樣的結果。