Finding Uppercase Character then Adding Space

后端 未结 3 880
梦毁少年i
梦毁少年i 2021-01-20 03:12

I bought a SQL World City/State database. In the state database it has the state names pushed together. Example: \"NorthCarolina\", or \"SouthCarolina\"...

IS there

3条回答
  •  情书的邮戳
    2021-01-20 04:00

    There's a couple ways to approach this

    1. Construct a function using a pattern and the PATINDEX feature.

    2. Chain minimal REPLACE statements for each case (e.g. REPLACE(state_name, 'hC', 'h C' for your example case). This seems is kind of a hack, but might actually give you the best performance, since you have such a small set of replacements.

提交回复
热议问题