Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-09-25 : 05:57:48
|
| hello..How i can wild search for character from A to Z in string??declare @Str varchar(100)set @Str = '1234adb6789iok'select patindex??????my output shuold be adbiokT.I.A |
|
|
nr
SQLTeam MVY
12543 Posts |
|
|
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-09-25 : 07:48:07
|
| thanks...for itcan you pls tell me how i search for alphabet in alphanumeric stringdeclare @s varchar(20)set @s = '123ertgh678'select @s????my output should look likeertghT.I.A |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-09-25 : 08:37:14
|
| did you look at the link?select @s = '1234adb6789iok' select @i = patindex('%[^a-zA-Z]%', @s) while @i > 0 begin select @s = replace(@s, substring(@s, @i, 1), '') select @i = patindex('%[^a-zA-Z]%', @s) endselect @s==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-09-26 : 09:26:55
|
| hey!!!Thank you very much!!!! :) :) |
 |
|
|
|
|
|