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 |
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2012-06-20 : 02:45:00
|
| how can i add in '+' infront of the mobile number?i have a list of mobile number that need to add '+' in the front.some already has the '+' sign infront. just need to update those who dont have yet.mobileNo608123213126081232131160812312333+60812345345+60823542357 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-06-20 : 02:59:08
|
[code]update tset mobile = '+' + mobilefrom tbl twhere mobile not like '+%'[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
vinu.vijayan
Posting Yak Master
227 Posts |
Posted - 2012-06-20 : 06:38:26
|
quote: Originally posted by khtan
update tset mobile = '+' + mobilefrom tbl twhere mobile not like '+%' KH[spoiler]Time is always against us[/spoiler]
Very Nice one Khtan.I did it with a Substring Condition to check the '+'.But yours is way more simple than that.Its just one of those days/times when only the harder solution comes to your mind......too much work I guess.N 28° 33' 11.93148"E 77° 14' 33.66384" |
 |
|
|
|
|
|