Created
June 26, 2017 14:44
-
-
Save jrjames83/2e334aede7a17a6013d2010f4a87dc20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jeff=# SELECT * FROM sample_data sd; | |
| string_data | |
| ---------------- | |
| en-src-m2m sim | |
| en-src-m2m dog | |
| en-src-m2m cat | |
| (3 rows) | |
| jeff=# select sd.string_data, split_part(sd.string_data, ' ', 1),split_part(sd.string_data, ' ', 2) FROM sample_data sd; | |
| string_data | split_part | split_part | |
| ----------------+------------+------------ | |
| en-src-m2m sim | en-src-m2m | sim | |
| en-src-m2m dog | en-src-m2m | dog | |
| en-src-m2m cat | en-src-m2m | cat | |
| (3 rows) | |
| jeff=# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment