Skip to content

Instantly share code, notes, and snippets.

@makaroni4
Created December 11, 2015 15:57
Show Gist options
  • Save makaroni4/991e2ce992cb8ccd08c3 to your computer and use it in GitHub Desktop.
Save makaroni4/991e2ce992cb8ccd08c3 to your computer and use it in GitHub Desktop.
Remove all non digit symbols from column in PostgreSQL
update fb_audiences
set facebook_id = replace(facebook_id, '[^0-9]+$', '');
SELECT id, facebook_id
FROM fb_audiences
WHERE facebook_id ~ '[^0-9]+$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment