March 9, 2011 at 12:21 pm
Hello All,
Is it possible to find out rows with repeating letters in a word using TSQL, if not what is the best approach ?
for example naame and name .. so it should give me row with naame as "aa" is repeated in it.
create table testing (id int identity(1,1), name varchar(20))
insert into testing values ( 'name')
insert into testing values ( 'nname')
insert into testing values ( 'naame')
insert into testing values ( 'naamme')
insert into testing values ( 'nnamee')
insert into testing values ( 'sqlserver')
insert into testing values ( 'sqqlservver')
I need to find that row and replace the repeting letter with single letter.
**** Somehow it gets posted twice... Moderators please delete one .. not sure why it happens
Thanks
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
March 9, 2011 at 12:51 pm
Ironic that in a post about removing duplicates ....
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 9, 2011 at 2:40 pm
Do you mean any row with a repeating letter? What about "letter" itself? It's a valid repetition.
March 9, 2011 at 2:46 pm
Steve Jones - SSC Editor (3/9/2011)
Do you mean any row with a repeating letter? What about "letter" itself? It's a valid repetition.
Thanks Steve for asking, I have it on http://www.sqlservercentral.com/Forums/Topic1075800-146-1.aspx
somehow it posts double when I try to post ... is it a problem with my browser ? I tried clearing all cookies and cache as well .. but no luck ..
sorry for double post 🙂
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
March 9, 2011 at 3:03 pm
No worries, I'll close this one.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply