Re: nested ORDER BY statements

2003-06-05 Thread Nils Valentin
Hi David, can't give you detailed advice but I believe you look for SELECT...GROUP BY ... ORDER BY Please see the docs like "info mysql". Best regards Nils Valentin Tokyo/Japan \ 2003年 6月 4日 水曜日 22:37、Dave Terrio さんは書きました: > Hello - I'm a relative newcomer to development with MySQL and am

RE: nested ORDER BY statements

2003-06-05 Thread Mike Hillyer
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 9:08 AM To: Mike Hillyer; Dave Terrio; [EMAIL PROTECTED] Subject: Re: nested ORDER BY statements Hi, I am a bit new to mysql but have extensive experience with Oracle. Does MYSQL allow a select like: select data1

Re: nested ORDER BY statements

2003-06-05 Thread t.wiegman
Hillyer" <[EMAIL PROTECTED]> To: "Dave Terrio" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, June 04, 2003 4:40 PM Subject: RE: nested ORDER BY statements Aah, in that case I am not sure you can do what you need to do with a single query... A UNION may

RE: nested ORDER BY statements

2003-06-05 Thread Mike Hillyer
Terrio; [EMAIL PROTECTED] Subject: RE: nested ORDER BY statements Aah, in that case I am not sure you can do what you need to do with a single query... A UNION may allow it. (SELECT * FROM table1 WHERE 1=0) UNION (SELECT * FROM table1 ORDER BY table1.time_created DESC LIMIT 50) ORDER BY table1

RE: nested ORDER BY statements

2003-06-05 Thread Mike Hillyer
to take away the first select and the union statement, I am not sure. Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Dave Terrio [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:27 AM To: Mike Hillyer Subject: RE: nested ORDER BY statements Thanks for the

Re: nested ORDER BY statements

2003-06-05 Thread Jose Miguel Pérez
Hi David, > Hello - I'm a relative newcomer to development with MySQL and am having a > problem with ordering my query results... This is a general SQL question. Try this: ... ORDER BY time_created DESC, name LIMIT ... In general, you can't declare a clause twice, except for the

RE: nested ORDER BY statements

2003-06-05 Thread Mike Hillyer
: nested ORDER BY statements Hello - I'm a relative newcomer to development with MySQL and am having a problem with ordering my query results... I first want to select the 50 most recently created records (with respect to my date field) and then order these with respect to another field (eg

nested ORDER BY statements

2003-06-04 Thread Dave Terrio
Hello - I'm a relative newcomer to development with MySQL and am having a problem with ordering my query results... I first want to select the 50 most recently created records (with respect to my date field) and then order these with respect to another field (eg name). That way I'm always "orde