Finding Uppercase Character then Adding Space
问题 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 a way in SQL to loop and find the uppercase characters and add a space??? this way "NorthCarolina" becomes "North Carolina"??? 回答1: Create this function if object_id('dbo.SpaceBeforeCaps') is not null drop function dbo.SpaceBeforeCaps GO create function dbo.SpaceBeforeCaps(@s varchar(100)) returns varchar(100) as begin declare @return