还是一个sql语句的问题!
有如下sql语句
select top 5 S.*, R.Hits,SectionName from BBS_Sections S Inner Join (select top 5 SectionID,Hits from BBS_Refers order by Hits desc) R On S.SectionID = R.SectionID
我想把top 5 S.*换成这样的形式:
( 'BBS_ReferList.aspx?SectionId= '+ CAST(SectionID as varchar(14))) as S.*但是报错!不知该怎么办?顺便问下,怎么给大家分?
------解决方案--------------------
( 'BBS_ReferList.aspx?SectionId= '+ CAST(SectionID as varchar(14))) as S.*
======> > >
( 'BBS_ReferList.aspx?SectionId= '+ CAST(S.SectionID as varchar(14))) as XXX
S.*随便换成个别的什么名