有如下表:
ID content
1 </v:shape><v:shape id="_x0000_s2100" type="#_x0000_t75" alt=""
2 href="http://www.xxx.com/xxx/=2596014"
3 target="_blank" style='position:absolute;margin-left:0;margin-top:4656pt;
4 width:12pt;height:12pt;z-index:1076' o:button="t">
5 <v:imagedata src="image005.gif" o:title="pdf"/>
6 <x:ClientData ObjectType="Pict">
7 <x:SizeWithCells/>
8 <x:CF>Bitmap</x:CF>
9 <x:AutoPict/>
10 </x:ClientData>
11 </v:shape><v:shape id="_x0000_s2106" type="#_x0000_t75" alt=""
12 href="http://www.xxx.com/xxx/=2596010"
13 target="_blank" style='position:absolute;margin-left:0;margin-top:65in;
14 width:12pt;height:12pt;z-index:1082' o:button="t">
15 <v:imagedata src="image005.gif" o:title="doc"/>
16 <x:ClientData ObjectType="Pdf">
17 <x:SizeWithCells/>
18 <x:CF>Bitmap</x:CF>
19 <x:AutoPict/>
20 </x:ClientData>
21 href="http://www.xxx.com/xxx/=2592292"
22 target="_blank"><area shape=Rect
23 coords="0, 22032, 16, 22048"
24 </v:shape><v:shape id="_x0000_s2109" type="#_x0000_t75" alt=""
25 href="http://www.xxx.com/xxx/=2596000"
26 target="_blank" style='position:absolute;margin-left:0;margin-top:4692pt;
27 width:12pt;height:12pt;z-index:1085' o:button="t">
28 <v:imagedata src="image008.gif" o:title="file"/>
29 <x:ClientData ObjectType="Doc">
30 <x:SizeWithCells/>
31 <x:CF>Bitmap</x:CF>
32 <x:AutoPict/>
33 </x:ClientData>
34 href="http://www.xxx.com/xxx/=2592296"
35 target="_blank"><area shape=Rect
36 coords="0, 22016, 16, 22032"
37 </v:shape><v:shape id="_x0000_s2103" type="#_x0000_t75" alt=""
38 href="http://www.xxx.com/xxx/=2596012"
39 target="_blank" style='position:absolute;margin-left:0;margin-top:4668pt;
40 width:12pt;height:12pt;z-index:1079' o:button="t">
41 <v:imagedata src="image005.gif" o:title="pdf"/>
42 <x:ClientData ObjectType="Pict">
43 <x:SizeWithCells/>
44 <x:CF>Bitmap</x:CF>
45 <x:AutoPict/>
46 </x:ClientData>
47 href="http://www.xxx.com/xxx/=2592298"
48 target="_blank"><area shape=Rect
49 coords="0, 22000, 16, 22016"
........表中的数据有上万条,我想实现这样的目的,context字段中内容有如下四种情况<x:ClientData ObjectType="Pict">; <x:ClientData ObjectType="Pdf">; <x:ClientData ObjectType="Doc">; <x:ClientData ObjectType="Text">,将所有<x:ClientData ObjectType="Pdf">或者<x:ClientData ObjectType="Doc">的记录之前的第四条记录同时contest字段中含有“href="http://www.xxx.com/xxx”字符串的记录找出来,比如ID为29的那一条记录中contest字段中的内容是<x:ClientData ObjectType="Doc">,向上数4条,即ID为25的那一条记录,因为包含“href="http://www.xxx.com/”字符,所以ID为25的记录符合要求,被SELECT出来,同理ID为16的那条内容为“<x:ClientData ObjectType="Pdf">”的记录之上的第四条记录即ID为12的那条记录也符合这种情况。
如何将所以符合这种情况的记录全SELECT出来?
ID content
1 </v:shape><v:shape id="_x0000_s2100" type="#_x0000_t75" alt=""
2 href="http://www.xxx.com/xxx/=2596014"
3 target="_blank" style='position:absolute;margin-left:0;margin-top:4656pt;
4 width:12pt;height:12pt;z-index:1076' o:button="t">
5 <v:imagedata src="image005.gif" o:title="pdf"/>
6 <x:ClientData ObjectType="Pict">
7 <x:SizeWithCells/>
8 <x:CF>Bitmap</x:CF>
9 <x:AutoPict/>
10 </x:ClientData>
11 </v:shape><v:shape id="_x0000_s2106" type="#_x0000_t75" alt=""
12 href="http://www.xxx.com/xxx/=2596010"
13 target="_blank" style='position:absolute;margin-left:0;margin-top:65in;
14 width:12pt;height:12pt;z-index:1082' o:button="t">
15 <v:imagedata src="image005.gif" o:title="doc"/>
16 <x:ClientData ObjectType="Pdf">
17 <x:SizeWithCells/>
18 <x:CF>Bitmap</x:CF>
19 <x:AutoPict/>
20 </x:ClientData>
21 href="http://www.xxx.com/xxx/=2592292"
22 target="_blank"><area shape=Rect
23 coords="0, 22032, 16, 22048"
24 </v:shape><v:shape id="_x0000_s2109" type="#_x0000_t75" alt=""
25 href="http://www.xxx.com/xxx/=2596000"
26 target="_blank" style='position:absolute;margin-left:0;margin-top:4692pt;
27 width:12pt;height:12pt;z-index:1085' o:button="t">
28 <v:imagedata src="image008.gif" o:title="file"/>
29 <x:ClientData ObjectType="Doc">
30 <x:SizeWithCells/>
31 <x:CF>Bitmap</x:CF>
32 <x:AutoPict/>
33 </x:ClientData>
34 href="http://www.xxx.com/xxx/=2592296"
35 target="_blank"><area shape=Rect
36 coords="0, 22016, 16, 22032"
37 </v:shape><v:shape id="_x0000_s2103" type="#_x0000_t75" alt=""
38 href="http://www.xxx.com/xxx/=2596012"
39 target="_blank" style='position:absolute;margin-left:0;margin-top:4668pt;
40 width:12pt;height:12pt;z-index:1079' o:button="t">
41 <v:imagedata src="image005.gif" o:title="pdf"/>
42 <x:ClientData ObjectType="Pict">
43 <x:SizeWithCells/>
44 <x:CF>Bitmap</x:CF>
45 <x:AutoPict/>
46 </x:ClientData>
47 href="http://www.xxx.com/xxx/=2592298"
48 target="_blank"><area shape=Rect
49 coords="0, 22000, 16, 22016"
........表中的数据有上万条,我想实现这样的目的,context字段中内容有如下四种情况<x:ClientData ObjectType="Pict">; <x:ClientData ObjectType="Pdf">; <x:ClientData ObjectType="Doc">; <x:ClientData ObjectType="Text">,将所有<x:ClientData ObjectType="Pdf">或者<x:ClientData ObjectType="Doc">的记录之前的第四条记录同时contest字段中含有“href="http://www.xxx.com/xxx”字符串的记录找出来,比如ID为29的那一条记录中contest字段中的内容是<x:ClientData ObjectType="Doc">,向上数4条,即ID为25的那一条记录,因为包含“href="http://www.xxx.com/”字符,所以ID为25的记录符合要求,被SELECT出来,同理ID为16的那条内容为“<x:ClientData ObjectType="Pdf">”的记录之上的第四条记录即ID为12的那条记录也符合这种情况。
如何将所以符合这种情况的记录全SELECT出来?
这样给你解决问题 的人也会更多