sqlserver分页语句出错了,大神帮我看看。。。。
select*from(selectgoodid,goodname,goodadrreds,goodprice,goodagio,(selectsum(GoodNum)f...
select
* from(select goodid,goodname,goodadrreds,goodprice,goodagio,(select
sum(GoodNum) from OrderDetailed where GoodID='x10001'), row_number() over(order
by goodid )as cc from goods where 1=1 and goodname like '%%' and goodname not
like '%爽肤水%' and GoodGround=0 )tall where cc between 1 and 10
错误消息:没有为
'tall' 的列 6 指定任何列。 展开
* from(select goodid,goodname,goodadrreds,goodprice,goodagio,(select
sum(GoodNum) from OrderDetailed where GoodID='x10001'), row_number() over(order
by goodid )as cc from goods where 1=1 and goodname like '%%' and goodname not
like '%爽肤水%' and GoodGround=0 )tall where cc between 1 and 10
错误消息:没有为
'tall' 的列 6 指定任何列。 展开
展开全部
--你少了一个列名 下面的语句 应该就不会报错
--and goodname like '%%' 你这里不知道要表达什么意思 这样写没有任何意义 还不如去掉
--有什么问题可以随时找我 希望采纳
select
* from
(select goodid,goodname,goodadrreds,goodprice,goodagio,
(select sum(GoodNum) from OrderDetailed where GoodID='x10001') col1,
row_number() over(order by goodid ) as cc
from goods where 1=1 and goodname like '%%' and goodname not
like '%爽肤水%' and GoodGround=0
) tall where cc between 1 and 10
--and goodname like '%%' 你这里不知道要表达什么意思 这样写没有任何意义 还不如去掉
--有什么问题可以随时找我 希望采纳
select
* from
(select goodid,goodname,goodadrreds,goodprice,goodagio,
(select sum(GoodNum) from OrderDetailed where GoodID='x10001') col1,
row_number() over(order by goodid ) as cc
from goods where 1=1 and goodname like '%%' and goodname not
like '%爽肤水%' and GoodGround=0
) tall where cc between 1 and 10
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询