The given is self explanatory. You can create function to use it in your queries.
The first section finds the specific character in the string.
The second section counts the words in the string.
Atif-ullah Sheikh,
2010-07-27 (first published: 2010-07-09)
The given is self explanatory. You can create function to use it in your queries.
The first section finds the specific character in the string.
The second section counts the words in the string.
-- Number of specific Characters Declare @aa varchar(100) Set @aa = 'SQL Server 2005000' Select Len(@aa) - Len(Replace(@aa, '0', '')) -- Number of Words DECLARE @String VARCHAR(4000) SELECT @String = 'SQL Server 2005 Atif Sheikh A' while CharIndex(' ',@String) > 1 begin Set @String = REPLACE(@String, ' ', ' ') end Select @String SELECT LEN(@String) - LEN(REPLACE(@String, ' ', '')) + 1
2013-11-11
1,789 reads
This article covers the use of the TOP clause to select data from a table based on the TOP n columns in a table.
I was asked to do so by one of my colleague. So, I thought to share it with you how to use multiple LIKE conditions.
2010-09-16 (first published: 2010-09-15)
3,611 reads
Utility stored procedure to create non-xml format file for BCP/BULK INSERT processes. Very useful for text-qualified CSV files.
2009-08-14 (first published: 2009-08-04)
2,373 reads
Searches precompiled procedures for the provided search string, optionally limiting to names matching a 2nd search string.
2009-10-08 (first published: 2008-06-20)
1,885 reads