mardi 26 juillet 2016

SQL Server : setting language while creating view

I need to have months in my language in this view. I try this:

CREATE VIEW countTask
AS
    SET LANGUAGE Polish

    SELECT COUNT(*), DATENAME(Month, startdate), YEAR(startdate)
    FROM TBL_TASKS
    GROUP BY YEAR(startdate), DATENAME(Month, startdate)

but it's not correct. Do you know how can I fix it?

Aucun commentaire:

Enregistrer un commentaire