在操作csw表时 发现很有用的xml查询sql备注如下:
select * from MDSYS.CSW_RT_6$ t where existsnode(t.datacol,’//*[geoglobe:parentId = “-1″]’,’xmlns:geoglobe=”http://www.geostar.com.cn/geoglobe”‘) > 0 order by RECORDID;
select extractValue(t.datacol,’/geoglobe:ResourceType/geoglobe:name’,’xmlns:geoglobe=”http://www.geostar.com.cn/geoglobe”‘) from MDSYS.CSW_RT_6$ t where t.recordid=’330000000000010000′;
select count(*) from MDSYS.CSW_RT_6$ t where t.datacol.existsnode(‘/geoglobe:ResourceType/geoglobe:chineseName’,’xmlns:geoglobe=”http://www.geostar.com.cn/geoglobe”‘)=1;
select extractvalue(t.datacol,’/geoglobe:ResourceType/geoglobe:name’,’xmlns:geoglobe=”http://www.geostar.com.cn/geoglobe”‘) from MDSYS.CSW_RT_6$ t where t.datacol.existsnode(‘/geoglobe:ResourceType/geoglobe:kind=”CATALOG”‘,’xmlns:geoglobe=”http://www.geostar.com.cn/geoglobe”‘)=1;
select * from MDSYS.CSW_RT_6$ t where t.datacol.existsnode(‘/geoglobe:ResourceType[geoglobe:chineseName=”永康市”]’,’xmlns:geoglobe=”http://www.geostar.com.cn/geoglobe”‘)=1;
发现xml查询功能很强悍!
转载请注明出处! http://www.cnblogs.com/likehua/archive/2011/05/26/2057938.html
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/4466.html