So I have this column which contains the street address and the house number, they are both kept in the same column.
Eg: Boulevard 123
Now I want to separate the letters from the numbers so I get "Boulevard" and "123" separately trough a select statement.
How can I do this, using reg expressions?
Thanks in advance
One way of doing this is by using regexp_split_to_array
to split the value by the space:
SELECT address_arr[1] AS streer_name, address_arr[2] AS street_number
FROM (SELECT REGEXP_SPLIT_TO_ARRY(address, ' ') AS address_arr
FROM my_table) t
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句