A/the 14th floor village name/high/2 unit area A/the 14th floor village name/2 unit/low area A/f/2 unit 13 village name/high area A/f/2 unit 13 village name/low area
Want to update into as follows, building date is change
Village name a high area high/14th floor/2 unit/area A low area/14 village name low f/2 unit/area Village name a high area/building/2 unit 13/high area A low area/floor 13 village name/2 unit/low area
CodePudding user response:
The CREATE TABLE # A ( The NAME VARCHAR (200) ) # INSERT INTO A VALUES (' A village name/14th floor high/2 unit/area ') # INSERT INTO A VALUES (' village name A low f/2 unit/area/14 ') # INSERT INTO A VALUES (' A/f/2, 13 village name high unit/area ') # INSERT INTO A VALUES (' A/f/2 unit 13 village name/low area ')
SELECT the LEFT (A.N AME, CHARINDEX ('/', A.N AME) - 1) + RIGHT (A.N AME, 2) + the SUBSTRING (A.N AME, CHARINDEX ('/', A.N AME), 999) FROM # aa