Other SQL Server Blogs around the Web

Remove duplicate characters from a string

Pinal Dave in his weblog posted about Remove Duplicate Chars From String Here is its alternate method with Number table approach create procedure remove_duplicate_characters ( @string varchar ( 100 )) as Declare @result varchar ( 100 ) set @result = '' select @result = @result + min ( substring ( @string , number , 1 )) from ( select number from master .. spt_values where type = 'p' and number between 1 and len ( @string ) ) as t group by substring ( @string, number , 1 ) order by min ( number )...(read more)

Read the complete post at http://sqlserver-qa.net/blogs/t-sql/archive/2007/12/29/3070.aspx

This Blog

Syndication



© 2000 - 2007 vDerivatives Limited All Rights Reserved.