连续区域取数

 select sid,min(b.eid) as eid from 

    (select  id+2 as sid  from txtTempTable where tc1 like 'Name*') as a,

      (select id as eid  from txtTempTable where tc1='Page') as b 

        where sid

       group by sid

                        16,18, 22,23

id       tc1tc21617182223

两表对应关联

select aa.sid,aa.eid, (select top 1 tc2 from txtTempTable where tc1 like "Analyte*" and id>aa.sid-14 and id

sid        eidmc1618f012223f02

精彩文章

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。