DB2使用正则表达式
Ricky
posted @ 2015年5月25日 15:13
in Other
, 4091 阅读
DB2 for z/OS需要用PASSING AS语句
SELECT * from table WHERE
xmlcast(xmlquery('fn:matches($column, ''[^0-9]+$'')' PASSING column AS column) AS integer) = 1
DB2 for LUW则不需要
SELECT * from table WHERE
xmlcast(xmlquery('fn:matches($column, ''[^0-9]+$'')') AS integer) = 1