0

Say I have a column called full_name:

  |  full_name |
    Johnson,Matt

So all the names inputted into this full name column are separated by a comma and no spaces, so how would I write a simple query to create a separate first name, and separate last name column in a case like this?

SteveC
  • 5,955
  • 2
  • 11
  • 24
CodingNoob
  • 59
  • 4
  • 1
    Take a look at [Falsehoods Programmers Believe About Names](https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/), though. – Eric Brandt Sep 25 '20 at 14:52
  • Specifically for BigQuery, I have tested the following query and it runs correctly, the post you are referencing as duplicated have invalid functions for BigQuery such as RIGHT and LEFT select name, SUBSTR(name,1,STRPOS(name,',')-1) as FirstName, SUBSTR(name,STRPOS(name,',')+1,LENGTH(name)) as LastName FROM test_dataset.tabletest; – Aldo González Ramírez Sep 25 '20 at 15:17

0 Answers0