Unix Technical Forum

ORDER BY problem

This is a discussion on ORDER BY problem within the MySQL General forum forums, part of the MySQL category; --> Hi while testing an upgrade from 3.23.58 to 4.1.22 on an FC3 test box SELECT * FROM Contacts WHERE ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-14-2008, 06:46 PM
Obantec Support
 
Posts: n/a
Default ORDER BY problem

Hi

while testing an upgrade from 3.23.58 to 4.1.22 on an FC3 test box

SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes REGEXP
"^R" and gold_id="2" ORDER BY "Company" ASC

on mysql server3.23.58 i get company result in ASC order.
on mysql server4.1.22 i get non ASC order for companies.

is there something on 4.1.22 i missed that effects ORDER BY?

Mark


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-14-2008, 06:46 PM
Obantec Support
 
Posts: n/a
Default Re: ORDER BY problem

----- Original Message -----
Subject: RE: ORDER BY problem


> Try your query with either back quotes around Company
>
> SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes
> REGEXP
> "^R" and gold_id="2" ORDER BY `Company` ASC
>
> Or no quotes around Company
>
> SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes
> REGEXP
> "^R" and gold_id="2" ORDER BY Company ASC
>
> -----Original Message-----
> From: Obantec Support [mailto:support@obantec.net]
> Sent: Friday, July 11, 2008 9:29 AM
> To: mysql@lists.mysql.com
> Subject: ORDER BY problem
>
> Hi
>
> while testing an upgrade from 3.23.58 to 4.1.22 on an FC3 test box
>
> SELECT * FROM Contacts WHERE Categories="Services" and BusinessCodes
> REGEXP
> "^R" and gold_id="2" ORDER BY "Company" ASC
> on mysql server3.23.58 i get company result in ASC order.
> on mysql server4.1.22 i get non ASC order for companies.
>
> is there something on 4.1.22 i missed that effects ORDER BY?
>
> Mark
>
>
>
>

Hi Rolando

please only reply to the list.

Ok fixed now by either method. I have chosen to leave the "" off.
Thanks

Mark




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com