Q&A for spacecraft operators, scientists, engineers, and enthusiasts
select left(str, charindex('^', str) - 1) as Address, right(reverse(substring(reverse(str), 2, charindex('^', str))), 4) as Postcode, reverse(substring(reverse(str), 2, charindex('^', str) - 5)) from ( select '28 Smith Avenue^MOOROOLBARK VIC 3138^' as str ) as a