David-377753
Right there with Babe
Points: 770
More actions
June 22, 2007 at 10:21 am
#196575
guys,
hope you are doing well,
I got a phone number field... lets call it phone the number is that field stats with 1.. I wanna replace 1 with nothing
155555555111
after running the update I wanna look like this:
55555555111
Thanks
Aaron Ingold
SSCrazy Eights
Points: 9070
June 22, 2007 at 10:36 am
#714646
Assuming that phone number is a character data type...
UPDATE mytable
SET PhoneNumber = RIGHT(PhoneNumber, LEN(PhoneNumber) - 1)
WHERE LEFT(PhoneNumber, 1) = '1'
June 22, 2007 at 10:51 am
#714650
it worked just fine...
Thank You
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply