Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Count Number of Words and Characters Expand / Collapse
Author
Message
Posted Monday, July 26, 2010 11:36 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 5:48 AM
Points: 3,241, Visits: 5,002
Comments posted to this topic are about the item Count Number of Words and Characters

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #959193
Posted Tuesday, July 27, 2010 12:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 10, 2012 4:04 AM
Points: 6, Visits: 17
Hello sir in your number of words count code, what is use of while block because it is done without using while block
Post #959207
Posted Tuesday, July 27, 2010 3:07 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, July 23, 2012 10:23 PM
Points: 400, Visits: 16
If I am not wrong, that while loop will never end.
Post #959262
Posted Tuesday, July 27, 2010 3:47 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Sunday, August 4, 2013 3:41 PM
Points: 28, Visits: 23
ra.shinde, you are correct, the while loop will never end. Besides from your first function you can derive the word count as well. See code below:

-- Number of specific Characters
Declare @aa varchar(100)
Set @aa = 'SQL Server 2005 Atif Sheikh A'
Select Len(@aa) - Len(Replace(@aa, ' ', '')) + 1
Post #959278
Posted Tuesday, July 27, 2010 10:22 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 5:48 AM
Points: 3,241, Visits: 5,002
WHILE loop is there by mistake (was testing something before posting it). Please ignore it.


----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #959820
Posted Friday, July 30, 2010 11:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 22, 2014 4:49 PM
Points: 5, Visits: 33
i posted that solution years ago, you just copied it and messed it up, please delete it
Post #961550
Posted Saturday, July 31, 2010 12:50 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 5:48 AM
Points: 3,241, Visits: 5,002
The Danish Dynamo (7/30/2010)
i posted that solution years ago, you just copied it and messed it up, please delete it


Really ? And how "messed up"?


----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #961786
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse