sql server 2008中 消息 207,级别 16,状态 1,第 3 行 列名 'newsign' 无效。
sql语句帮忙看哪里不对呀select*from(selectROW_NUMBER()over(orderbynews.is_topasc,news.news_pubti...
sql语句
帮忙看哪里不对呀
select * from
(select
ROW_NUMBER() over(order by news.is_top asc ,news.news_pubtime desc, newsign DESC) as rowNumber,
news.id,news.news_title,ref.user_id,news.is_top,
(case when ref.user_id is null then '0' else '1' end )as newsign ,
CONVERT(varchar(20),news.news_pubtime,20) as pubtime,
CONVERT(varchar(20),news.news_pubtime,23) as news_pubtime
from ro_news news
LEFT JOIN ro_news_ref ref ON ref.news_id = news.id AND ref.user_id = 6
where news.is_release = '0' and news.sign='0'
)
as a
where rowNumber >5 and rowNumber <=8 展开
帮忙看哪里不对呀
select * from
(select
ROW_NUMBER() over(order by news.is_top asc ,news.news_pubtime desc, newsign DESC) as rowNumber,
news.id,news.news_title,ref.user_id,news.is_top,
(case when ref.user_id is null then '0' else '1' end )as newsign ,
CONVERT(varchar(20),news.news_pubtime,20) as pubtime,
CONVERT(varchar(20),news.news_pubtime,23) as news_pubtime
from ro_news news
LEFT JOIN ro_news_ref ref ON ref.news_id = news.id AND ref.user_id = 6
where news.is_release = '0' and news.sign='0'
)
as a
where rowNumber >5 and rowNumber <=8 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询