2011-06-01
select c.sn, d.sn, c.due_date - d.due_date
from
(select * FROM ImpDn where sn%2 = 0) c
join (select * from ImpDn where sn%2 = 1) d
on d.sn+1 = c.sn
(select ROW_NUMBER() OVER (ORDER BY NEWID()) AS RowNo FROM ImpDn)
宁可危险,有些疯癫,没有遮掩。
(select ROW_NUMBER() OVER (ORDER BY NEWID()) AS RowNo FROM ImpDn)