We have an ID field in a table. Currently this contains values such as:
I want to select only 123, 0123. Currently I am doing sel * from table where column like any ('%1%','%2%'...'%9%').
Is there any other way to do it.
If you're on TD14 you might use a Regular Expression.
This is exactly hat you're doing right now, "check if there's any digit between 1 and 9":
where regexp_similar(id,'[1-9]+') = 1
But this will return also '??1?', if you don't want that:
where regexp_similar(id,'0*+[0-9]+') = 1