|
|
Joined: Mar 2004
Posts: 188
Member
|
Member
Joined: Mar 2004
Posts: 188 |
Anybody any good with MySQL? I'm trying to figure out an SQL statement that will change all of the items in say an Item field that have the item Accessories:Partnumber. So it would be in the column Item and then there's a whole bunch of items with the name Accessories:5555 and Accessories:6666 and Accessories:7777 so...I want to take out the part of the Item "Accessories:" Is there a way to do that, or do I have to do each item?
Cheryl McLean Communications Done Right
|
|
|
Visit Atcom to get started with your new business VoIP phone system ASAP
Turn up is quick, painless, and can often be done same day.
Let us show you how to do VoIP right, resulting in crystal clear call quality and easy-to-use features that make everyone happy!
Proudly serving Canada from coast to coast.
|
|
|
Joined: Jun 2005
Posts: 102
Member
|
Member
Joined: Jun 2005
Posts: 102 |
Not real sure that this is it but might find this helpful, please use this in a test or a backup :
UPDATE mytable SET myfield = REPLACE( myfield,' %Accessories:%','')
The '' at the end are actually 2 single quotes
Keep The Old Stuff Running
|
|
|
|
Joined: Jun 2005
Posts: 102
Member
|
Member
Joined: Jun 2005
Posts: 102 |
Or maybe better yet :
UPDATE mytable SET myfield = REPLACE( myfield,' Accessories:%','')
PLEASE DO NOT TRY THESE ON SOMETHING THAT MIGHT GET HOSED......
Keep The Old Stuff Running
|
|
|
Forums84
Topics94,548
Posts640,092
Members49,857
|
Most Online5,661 May 23rd, 2018
|
|
0 members (),
807
guests, and
30
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|
|