0
我可以輸出月份名稱而不是此查詢中的月份數字嗎?SQL查詢輸出月份名稱而不是月份數字
SELECT
YEAR(Periodo) AS year,
MONTH(Periodo) AS month,
SUM(Paid) AS paid
FROM
affitto_sa
GROUP BY
YEAR(Periodo),
MONTH(Periodo)
我可以輸出月份名稱而不是此查詢中的月份數字嗎?SQL查詢輸出月份名稱而不是月份數字
SELECT
YEAR(Periodo) AS year,
MONTH(Periodo) AS month,
SUM(Paid) AS paid
FROM
affitto_sa
GROUP BY
YEAR(Periodo),
MONTH(Periodo)
SELECT
YEAR(Periodo) AS year,
Datename(month, Periodo) AS month,
SUM(Paid) AS paid
FROM
affitto_sa
GROUP BY
YEAR(Periodo),
MONTH(Periodo)
謝謝Preet。它效果很好。 – FeliceM
使用'DATENAME(月,Periodo)' – praveen
非常感謝。有用。 – FeliceM