STackoverflow #8844796

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフローMeta

プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答

select 
  str,
  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)))
from
(
  select '28 Smith Avenue^MOOROOLBARK VIC 3138^' as str
) as a

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results