| Author |
Topic |
|
tooba
Posting Yak Master
224 Posts |
Posted - 2011-03-21 : 21:14:08
|
| Hi, Here is my sample data, In my source table i have more than 60k rows. Date2/10/20062/10/062/10/06Thursday, 2/16/2006Thursday, 2/16/2006Thursday, 2/16/2006Thursday, 2/16/2006Thursday, 2/16/2006Thursday, 2/16/20063/9/20063/9/20063/15/20067/7/067/7/06 How i can delete all Alpha values from my source data e.g I want to delete "Thursday" Thanks in advance. |
|
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2011-03-22 : 00:39:25
|
depends. 1 way is to write a function and go through each charecter which can take a little time to do, or if you are only deleting"Monday","Tuesday",Wed,etc I would do this.update aset date = replace(replace(replace(replace(replace(replace(replace(replace(date,'Monday,',''),'Tuesday,',''),'Wednesday,',''),'Thursday,',''),'Friday,',''),'Saturday,',''),'Sunday,','')frommytable aI haven't tested the code, so check for syntax. Success is 10% Intelligence, 70% Determination, and 22% Stupidity.\_/ _/ _/\_/ _/\_/ _/ _/- 881 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-03-22 : 04:35:53
|
| orselect substring(col,patindex('%[0-9]%',col),len(col)) from tableMadhivananFailing to plan is Planning to fail |
 |
|
|
tooba
Posting Yak Master
224 Posts |
Posted - 2011-03-22 : 20:57:00
|
| Thanks for your reply. |
 |
|
|
|
|
|