怎么按日期的连续顺序置排序号

如何按日期的连续顺序置排序号
SQL如何按日期的连续顺序置排序号
例如:
日期                              排序号
2014-03-10                       1
2014-03-11                       2
2014-03-12                       3
2014-04-01                       1
2014-04-02                       2
2014-04-05                       1
2014-04-07                       1
即连续的日期才生成顺序号,如果不连续就重新从1生成,
请问如何写sql语句
注意:本人使用的是sql2000,无法使用row_number函数,请大神在2000的基础上给予解决,谢谢!
------解决方案--------------------

create table test(a date)
insert into test
select '2014-03-10' union                       
select '2014-03-11' union                       
select '2014-03-12' union                   
select '2014-04-01' union                
select '2014-04-02' union                
select '2014-04-05' union                 
select '2014-04-07'
select a,IDENTITY(int,1,1)b into testb from test;
with tb as(
select a,CONVERT(varchar,a,12)-b b from testb)
select a,(select SUM(b) from tb where a.a>=a and a.b=b)/b from tb a


没用过2000啊,不知道支持不支持这么写啊
------解决方案--------------------
引用:

create table test(a date)
insert into test
select '2014-03-10' union                       
select '2014-03-11' union                       
select '2014-03-12' union                   
select '2014-04-01' union                
select '2014-04-02' union                
select '2014-04-05' union                 
select '2014-04-07'
select a,IDENTITY(int,1,1)b into testb from test;
with tb as(
select a,CONVERT(varchar,a,12)-b b from testb)
select a,(select SUM(b) from tb where a.a>=a and a.b=b)/b from tb a


没用过2000啊,不知道支持不支持这么写啊

2000不支持公用表达式的 改成临时表吧