Reputation: 2238
I've the following string that I would like to split and given in rows.
Example values in my column are:
['10000', '10001', '10002', '10003', '10004']
Using the SPLIT function, I get the following result:
I've two questions:
'
?Response:
Upvotes: 0
Views: 519
Reputation: 172993
Consider below example
with t as (
select ['10000', '10001', '10002', '10003', '10004'] col
)
select cast(item as int64) num
from t, unnest(col) item
Above is assumption that col is array. In case if it is a string - use below
with t as (
select "['10000', '10001', '10002', '10003', '10004']" col
)
select cast(trim(item, " '[]") as int64) num
from t, unnest(split(col)) item
Both with output
Upvotes: 1