Current location: Hot Scripts Forums » Programming Languages » PHP » MYSQL Distinct Query problem


MYSQL Distinct Query problem

Reply
  #21 (permalink)  
Old 02-28-07, 08:33 AM
PostScript PostScript is offline
New Member
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Have you tried trimming spaces on import?

I have had a problem before now where imported data had preceeding spaces. Whenever I looked at the data in an HTML page, the extra spaces didn't show up and so it wasn't obvious. But, if you are trying to ORDER BY, the imported values that start with a space (asc(32)) will always be placed above the newly added values that don't.

Try: UPDATE customers SET last_name = TRIM(last_name)
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Query problem Spreegem PHP 4 08-18-04 06:11 PM
MySQL Query problem Wraith PHP 5 03-06-04 05:16 PM
MySQL Expert Required!! Advanced Query Problem bluey_the_punch PHP 1 02-28-04 01:37 PM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM


All times are GMT -5. The time now is 05:14 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.