のため申し訳ありません
は、あなたが使用できるSQL Server 2008の
declare @longAddress varchar(max)
set @longAddress = 'District ALBERT numero 1234 city CASABLANCA région de NORTH country MOROOCO '
--assuming regin follow city
select CHARINDEX('numero',@longAddress)-- this is how you get position of numero and region
--do a substring
select SUBSTRING(@longAddress,1,CHARINDEX('numero',@longAddress)-1) -- get the district
select SUBSTRING(@longAddress,charindex('city',@longAddress),charindex('région',@longAddress)-charindex('city',@longAddress)) -- get the city
--combine
select SUBSTRING(@longAddress,1,CHARINDEX('numero',@longAddress)-1) -- get the district
+SUBSTRING(@longAddress,charindex('city',@longAddress),charindex('région',@longAddress)-charindex('city',@longAddress)) -- get the city
はアドレスが同じパターンで常にありますか? ' numero 市 .... ' –
はいホルヘ。地区と都道府県 – aziz