我可以在 SQL Server 中运行此查询:
SELECT "HIRING PIPE REQ NUMBER",
ROW_NUMBER()
OVER (
PARTITION BY "HIRING PIPE REQ NUMBER"
ORDER BY "HIRING PIPE REQ NUMBER") RowNumber
FROM DBO.TALENTDELIVERY_REQ_3FACTS
但是,当我将下面的代码放入VIEW
.
SELECT "HIRING PIPE REQ NUMBER",
ROW_NUMBER()
OVER (
PARTITION BY "HIRING PIPE REQ NUMBER"
ORDER BY "HIRING PIPE REQ NUMBER")AS RowNumber
FROM (SELECT *
FROM DBO.TALENTDELIVERY_REQ_3FACTS)
为什么这在 VIEW 中失败?
我怎样才能在 VIEW 中写下以上内容?