I have a column with suburb names and postcodes – eg – MARLEY HEIGHTS 2067. I want to remove the last 5 characters and get the suburb name only. i.e., MARLEY HEIGHTS as the result. How can I do that in big query ?
I tried Rtrim(column,’ ‘) as suburb, but this did not work.
Any help would be greatly appreciated ! Thanks !
>Solution :
SUBSTR(string, 1, LENGTH(string) - 5)