Re: need help with GROUP BY

2003-02-08 Thread Paul DuBois
At 9:24 -0600 2/5/03, Jaime Teng wrote: I have a MySQL table: ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | id

RE: need help with GROUP BY

2003-02-07 Thread Shapiro, David
DISTINCT? -Original Message- From: Tab Alleman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 12:31 PM To: Jaime Teng; [EMAIL PROTECTED] Subject: RE: need help with GROUP BY SELECT id,account FROM tablename WHERE detail LIKE '%pattern%' GROUP BY Account; -Original

RE: need help with GROUP BY

2003-02-06 Thread Tab Alleman
SELECT id,account FROM tablename WHERE detail LIKE '%pattern%' GROUP BY Account; -Original Message- From: Jaime Teng [mailto:[EMAIL PROTECTED]] I have a MySQL table: ... It should only return *one* result per account.

Re: need help with GROUP BY

2003-02-06 Thread Frank Peavy
Jaime, You should be using the DISTINCT function. SELECT DISTINCT account, id, FROM etc. This should give you one instant of 'account' in your SELECT output. At 09:24 AM 2/5/03 +, Jaime Teng wrote: I have a MySQL table:

Re: need help with GROUP BY

2003-02-06 Thread Frank Peavy
Jaime, You should be using the DISTINCT function. SELECT DISTINCT account, id, FROM etc. This should give you one instant of 'account' in your SELECT output. At 09:24 AM 2/5/03 +, Jaime Teng wrote: I have a MySQL table:

need help with GROUP BY

2003-02-05 Thread Jaime Teng
I have a MySQL table: ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | id | int(10) unsigned | | PRI | NULL