http://stanbiron.com/2010/07/29/SimpleWayToCountCharactersAndWordsUsingTSQL.aspx
-- Count the number of words
DECLARE @String VARCHAR(100)
SELECT @String = 'SQL Server 2005 Stan test code'
SELECT LEN(@String) - LEN(REPLACE(@String, ' ', '')) + 1
Wednesday, November 9, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment