I want to find rows that not contains exactly 8 numbers in Ident column, everything non numeric, white space, less numbers, more numbers.. From column in PostgreSQL. From table below I want get everything without row ID 5
ID | Ident |
---|---|
1 | FN033741 |
2 | NZ244/20 |
3 | 001091 |
4 | 01-09-16 |
5 | 06494824 |
6 | 102 |
I have tried this but don’t know how to identified the rows with exactly 8 numbers.
where ident !~ ‘^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?$’
3
Answers
I used this one
We can use a regular expression that matches anyy non-numeric characters and then count the number of numeric expressions. Applying this query might help:
Try this query, I have tested it here: