Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- s.catalogue_code,
- regexp_replace(s.catalogue_code, '[^0-9]+', '', 'g')
- FROM
- stamp s
- WHERE
- regexp_replace(s.catalogue_code, '[^0-9]+', '', 'g')::int BETWEEN 0 AND 100
- ORDER BY
- naturalsort(s.catalogue_code) ASC
- ;
- SELECT
- s.id,
- c.acronym,
- s.catalogue_code
- FROM stamp s
- inner join country c on s.country_id = c.id
- WHERE
- s.catalogue_code ~ '^[^0-9]+$';
- SELECT
- s.catalogue_code,
- regexp_replace(s.catalogue_code, '[^0-9]+', '', 'g')
- FROM
- stamp s;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement