Friday, August 2, 2013

Netezza regexp_like. Regex to find integers only

regex is very handy and to be able to use it as part of a sql is just plain awesome I think.

I needed to find all records that only has integers in that field and this is how I did it:

select *
from TABLENAME
where regexp_like(INPUTCOLUMNNAME ,'^\d+$');


6 comments: