Solved

update help needed

Posted on 2011-02-24
3
313 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses four methods for overlaying images in a container on a web page
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…

734 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