我试图在 MSSQL 2008 R2 中执行以下查询,但它抛出错误。问题是:
SELECT (n_artifactType+(' '+ n_actionPerformed)) AS actionperformed,
COUNT(n_actionPerformed) total FROM notifications WHERE n_project='JupiterQA'
GROUP BY actionperformed order by n_actionPerformed;
错误是:
Msg 207, Level 16, State 1, Line 1
Invalid column name 'actionperformed'.
使用“actionperformed”作为别名,即使它抛出错误。如何执行上述查询而不会出错。