I've a column of emails and I'd like to split it into two columns using @
as a delimiter.
Table:
Expected outcome
CodePudding user response:
Try
select split(email, "@")[ofsset(0)],split(email, "@")[ofsset(1)]
CodePudding user response:
Try SPLIT with subsequent OFFSET:
SELECT SPLIT(email, '@')[OFFSET(0)] as email1, SPLIT(email, '@')[OFFSET(1)] as email2
FROM mytable