Skip to content

Instantly share code, notes, and snippets.

@drhanlau
Created February 25, 2016 15:15
Show Gist options
  • Save drhanlau/a2c8ea69a302e7e0bc93 to your computer and use it in GitHub Desktop.
Save drhanlau/a2c8ea69a302e7e0bc93 to your computer and use it in GitHub Desktop.
SELECT
regexp_extract(col_value, '^(?:([^,]*)\,?){1}', 1) player_id,
regexp_extract(col_value, '^(?:([^,]*)\,?){2}', 1) year,
regexp_extract(col_value, '^(?:([^,]*)\,?){9}', 1) run
from temp_batting;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment