Solved

update help needed

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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 look for a specific file type in a local or remote server directory using PHP.

803 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