Re: Order By number of rows returned ?

2001-12-15 Thread Steve Edberg
Hi - I had a nagging feeling that there was a better solution to this than the temporary table-based solutions I saw; I created a table 'test' with the data you have below, and played with queries a bit. I came up with this, seems to work: select a.web_account,a.code_short,sum(if(a.web_a

Re: Order By number of rows returned ?

2001-12-14 Thread Girish Nath
Hmmmrunning MySQL 3.22.32 on actual server :( No temporary heap tables :( Girish - Original Message - From: "Christopher Bergeron" <[EMAIL PROTECTED]> To: "MySQL" <[EMAIL PROTECTED]> Sent: Saturday, December 15, 2001 12:49 AM Subject: RE:

RE: Order By number of rows returned ?

2001-12-14 Thread Christopher Bergeron
1:25 AM To: Girish Nath Cc: Johnny Withers; [EMAIL PROTECTED] Subject: Re: Order By number of rows returned ? Create temporary files instead, in that case you don't have to worry about DROPing the tables, they will get dropped as soon as the mysql session is closed. Girish Nath wrote: GN

Re: Order By number of rows returned ?

2001-12-14 Thread sherzodR
To: Johnny Withers <[EMAIL PROTECTED]>, [EMAIL PROTECTED] GN: Subject: Re: Order By number of rows returned ? GN: GN: Hi GN: GN: Thanks for that, it works really well :) GN: GN: Best Regards GN: GN: GN: Girish GN: GN: GN: - Original Message -

Re: Order By number of rows returned ?

2001-12-14 Thread Girish Nath
Hi Thanks for that, it works really well :) Best Regards Girish - Original Message - From: "Johnny Withers" <[EMAIL PROTECTED]> To: "'Girish Nath'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 14, 2001 3:03

RE: Order By number of rows returned ?

2001-12-14 Thread Johnny Withers
Friday, December 14, 2001 7:13 AM To: [EMAIL PROTECTED] Subject: Order By number of rows returned ? Hi I'm trying to do some sorting by relevance on a query. Essentially, i'd like to know if there is way to order the results by number of rows returned or if this is the best i can

Order By number of rows returned ?

2001-12-14 Thread Girish Nath
Hi I'm trying to do some sorting by relevance on a query. Essentially, i'd like to know if there is way to order the results by number of rows returned or if this is the best i can get and do the rest within PHP? mysql> SELECT web_account, code_short FROM lookup WHERE code_short IN ('U', 'S', 'G

Re: order by number

2001-08-30 Thread Adams, Bill TQO
uot; wrote: > What about a number field w/zero fill? > On Thu, 30 Aug 2001, Adams, Bill TQO wrote: > > > Date: Thu, 30 Aug 2001 08:48:11 -0700 > > From: Adams, Bill TQO <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject:

Re: order by number

2001-08-30 Thread William R. Mussatto
What about a number field w/zero fill? On Thu, 30 Aug 2001, Adams, Bill TQO wrote: > Date: Thu, 30 Aug 2001 08:48:11 -0700 > From: Adams, Bill TQO <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: order by number > > If the column is a

Re: order by number

2001-08-30 Thread Adams, Bill TQO
If the column is an int then it will order it numerically. Other wise you have to cast it. And dont for get the difference between ORDER BY x ASC and ORDER BY x DESC. --Bill DROP TABLE IF EXISTS test; CREATE TABLE test ( i int, c char(20)); INSERT INTO test VALUES ( 1, '5' ), ( 2, '4' ), ( 3

order by number

2001-08-30 Thread Philip Montgomery
When doing a select with an order by clause, how do you make mysql list the items in correct numberical order. Normally, when I run the command mysql will list 1000 before 200 because of the initial digit. How do I correct this? Thanks, Phil Get 250 color business cards for FREE! http://bu