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
I'm not sure if you can do this all in one query.. I tried a few JOINs, and nothing seemed to work. However, I'm not up to speed on how to join things together to get the best results. However, you can do it by creating a temp table: create table tmp01( web_account char(4) not null default '

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