Q&A about the site for Drupal developers and administrators
-- Enter Query Title -- Enter Query Description DECLARE @st_Spaces char(25) DECLARE @st_NoSpaces char(25) SET @st_Spaces = '123 56' --One space, pos 4 SET @st_NoSpaces = REPLACE(@st_Spaces, ' ', '4') --Replace space w/ 4 SELECT LEN(LEFT(@st_Spaces, 4)), --Returns 3 LEN(LEFT(@st_NoSpaces,4)) --Returns 4