我想在一个表中对行进行排名,而不是在排名中跳过数字.请看下面的例子.
CREATE TABLE #test(
apples int NOT NULL,
) ON [PRIMARY]
GO
insert into #test( apples ) values ( 10 )
insert into #test( apples ) values ( 10 )
insert into #test( apples ) values ( 20 )
insert into #test( apples ) values ( 30 )
select *, RANK() over (order by apples) as theRank from #test
drop table #test
go
Run Code Online (Sandbox Code Playgroud)
结果是
apples theRank
10 1
10 1
20 3
30 4
Run Code Online (Sandbox Code Playgroud)
如何让排名不跳过数字2,以便结果如下
apples theRank
10 1
10 …Run Code Online (Sandbox Code Playgroud) 我正在将所有内容&转换&为我的XML,以便XSLT可以编译.我正在将XML设计为HTML.但是,当XSLT填充文本框时,我需要&显示为&.
例如,它you & me在文本框中显示" ",但我需要看到" you & me".