Microsoft
Software
Hardware
Network
Question : mysql UPDATE TABLE where field 1 IN feild 2
In my version of plain english, i have 2 things i need to do.
1)
I want to update MYTABLE
to remove what is contained in FIELDB from FIELDA
EG I HAVE THIS
FIELDA FIELDB
hello1234 1234
I NEED THIS
FIELDA FIELDB
hello 1234
PART 2)
I also need to know how to strip it out if it is in the MIDDLE of a field
FIELD_X FIELD_Y
hello1234hello 1234
I NEED THIS
FIELD_X FIELD_Y
hellohello 1234
Thankyou.
Answer : mysql UPDATE TABLE where field 1 IN feild 2
Below should work for both the cases:
update yourtable set FIELDA=replace(FIELDA ,FIELDB,'');
Make sure you backup your table before trying any query.
Random Solutions
How do you move a VB.NET Click Once Deployment to a new network share?
SQL
Is there a way to push a themepack to windows 7 computers via GPO? Or a powershell script?
pictures that make customers more likely to buy shopping cart products
How do reset bios password on eMachine m5310 Laptop
How to Truncate Body Text in SharePoint 2007 RSS Viewer Webpart
Backing up SQL Server 2000 database on 2008
sql cast(decimalvalue as varchar(50))/100.00 fail
Visual Basic .net Random class, next problem
How to remove Exchg 5.5 from Exchg 2003 envoriment?