August 6, 2005 at 12:59 am
hi friends. i hope someone can solve this for me.
i want to search for some text in a row, and remove it. But it should keep the remainging part.
ex. if the value is "XX.(AABBCCDD)" and i want to remove "(.AABBCCDD) i would be left with "XX" as the value.
HOW to do it in a single SQL statement!!!
Will any UPDATE statement work!!!
thnx!!!!
August 6, 2005 at 2:28 am
UPDATE foo SET bar = REPLACE(bar, '.(AABBCCDD)', '')
August 6, 2005 at 2:34 am
thnx. it worked.
Can it be done with the STUFF function
August 6, 2005 at 4:41 am
Well, yes, you can use the STUFF function in the same way. But it is going to be much more complicated since you need to find out where to stuff and so on. What are you trying to accomplish?
August 6, 2005 at 4:47 am
yea.. its true..
i asked for STUFF coz i tried it and was not able to get the desired result.
I want to do post-processing on the data so that "somepartofvalue" is removed from the actual entries.
Again thnx for the UPDATE querry.
It's working FINE!!!!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply