周泉

宁可危险,有些疯癫,没有遮掩。

导航

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) 

posted on 2011-06-01 20:03  周泉  阅读(136)  评论(0编辑  收藏  举报