1、字符串强转成整型
在查询构建器中,对字符串的字段进行范围查询,比如查询大于3的要素记录
解决方法:字符串强转成整型,在10.6.1中的gdb中的数据测试如下:cast(trim(both from testfield) as integer)>3
提示:testfield是指字段名,基于自己的属性表字段名进行替换。
2、如何使用多个字段进行条件查询
在Definition Query中如何使用多个字段进行条件查询。 例如:将B和4对应的数据记录不显示。
解决方法: [fielname1] <> 'B' or [fieldname2] <> '4'
在否定表达里,运算符左边和右边同时满足的情况是用“or”
在肯定表达里,运算符左边和右边同时满足的情况是用“and”
如果是范围很多的话可以使用组合表达式,具体的请参考链接:
http://resources.arcgis.com/zh-cn/help/main/10.2/index.html#/na/00s500000033000000/
http://resources.arcgis.com/zh-cn/help/main/10.2/index.html#/na/00s50000002t000000/
例如:select *from t1 where country_na <>'B' and type<>'2'