

连续区域取数
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 两表对应关联 select aa.sid,aa.eid,id tc1 tc2 16 17 18 22 23
(select top 1 tc2 from txtTempTable where tc1 like "Analyte*" and id>aa.sid-14 and id
(
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
) as aasid eid mc 16 18 f01 22 23 f02