Solved

update help needed

Posted on 2011-02-24
3
309 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Help cleaning out CSS 2 32
two tables one button 11 20
masking php string 4 11
uploading image to a profile page 1 8
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

743 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

11 Experts available now in Live!

Get 1:1 Help Now