一段sql语句,总是提示order by附近有语法错误。求指教
WITHaos_query_AS(SELECTTOP100PERCENTROW_NUMBER()OVER(ORDERBYrn_.ProjectCodeDESC)ASaos...
WITH aos_query_ AS (
SELECT
TOP 100 PERCENT ROW_NUMBER () OVER (ORDER BY rn_.ProjectCode DESC) AS aos_rn_,
rn_.*
FROM
(
SELECT
mms_project.projectname,
p.*
FROM
(
SELECT
*
FROM
tp_product
WHERE
ProjectCode IN (
'D58E3582AFA99040E27B92B13C8F2280',
'3D2172418CE305C7D16D4B05597C6A59',
'5b971ed70c8ee3cb'
)
) p
LEFT JOIN mms_project ON p.projectcode = mms_project.ProjectCode
) rn_
) SELECT
*
FROM
aos_query_
WHERE
aos_rn_ BETWEEN + 1
AND
ORDER BY
aos_rn_ 展开
SELECT
TOP 100 PERCENT ROW_NUMBER () OVER (ORDER BY rn_.ProjectCode DESC) AS aos_rn_,
rn_.*
FROM
(
SELECT
mms_project.projectname,
p.*
FROM
(
SELECT
*
FROM
tp_product
WHERE
ProjectCode IN (
'D58E3582AFA99040E27B92B13C8F2280',
'3D2172418CE305C7D16D4B05597C6A59',
'5b971ed70c8ee3cb'
)
) p
LEFT JOIN mms_project ON p.projectcode = mms_project.ProjectCode
) rn_
) SELECT
*
FROM
aos_query_
WHERE
aos_rn_ BETWEEN + 1
AND
ORDER BY
aos_rn_ 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询