我有这样的SELECT
声明:
SELECT
ProjectId,
ProjectName,
D3 as "three month ago",
D2 as "two month ago",
D1 as "last month",
F0 as "current month",
F1 as "next month",
F2 as "next two month",
FROM
View_Year_Forcast
我想根据当月指定列名。
我有一个函数get_month_name
可以获取像 (d1,d2,d3,f0..) 这样的月份符号,并返回一个表示希伯来语月份名称的字符串。
解决问题的最佳方法是什么?
只是为了记录,我试图在 SQL Server 的存储过程中执行此操作