Solved

update help needed

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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 …
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 dynamically set the form action using jQuery.

821 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