Solved

update help needed

Posted on 2011-02-24
3
310 Views
Last Modified: 2012-05-11
hello

i am trying to find a way to remove spaces from an entry in a mysql column. for example, if there is a column `item` which has an entry ABC 123456, i need to remove the space and make it ABC123456. i would like a way such as an update because there are hundreds of these to remove. i would appreciate any help or advice. thanks
0
Comment
Question by:peter_coop
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 34969011
this should do:
UPDATE yourtable SET `item` = replace(`item`, ' ', '' )
where `item` LIKE '% %'

Open in new window

0
 

Author Comment

by:peter_coop
ID: 34969114
excellent. thank you very much.
0
 

Author Closing Comment

by:peter_coop
ID: 34969117
thanks once again
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now