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 |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2009-02-26 : 05:10:42
|
| Hello guys,whats the best and most efficient way to filter numbers in a SP ?Am currently using this set @csv = replace(@csv, 'a','')set @csv = replace(@csv, 'b','')set @csv = replace(@csv, 'c','')etcandset @csv = replace(@csv, '£','') set @csv = replace(@csv, '$','')set @csv = replace(@csv, '*','')etc for non alpha characters.the other way, I thought about implementing is to use an array of characters and run a split function to check and remove its existence.thanksEhi |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-02-26 : 06:07:07
|
What is a number?1234567890123,123.45123.00GreetingsWebfred No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2009-02-26 : 06:23:31
|
| intergersno dots and not commas, simply integers. |
 |
|
|
heavymind
Posting Yak Master
115 Posts |
Posted - 2009-02-26 : 06:41:17
|
| you may use cycle by each symbol from 0 to 255 except the number symbols (using char () function) with replace. or cycle by each symbol of the string and compare it to [0-9].Thanks, VadymMCITP DBA 2005/2008Chief DBA at http://www.db-staff.com |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-26 : 06:50:54
|
| go through this,http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79083 |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
|
|
|
|
|
|
|