Remove certain characters from a string

后端 未结 3 1261
自闭症患者
自闭症患者 2021-02-06 20:25

I\'m trying to remove certain characters.

At the moment I have output like cityname district but I want to remove cityname.

SEL         


        
3条回答
  •  一整个雨季
    2021-02-06 20:43

    One issue with REPLACE will be where city names contain the district name. You can use something like.

    SELECT SUBSTRING(O.Ort, LEN(C.CityName) + 2, 8000)
    FROM   dbo.tblOrtsteileGeo O
           JOIN dbo.Cities C
             ON C.foo = O.foo
    WHERE  O.GKZ = '06440004' 
    

提交回复
热议问题