At 9:24 -0600 2/5/03, Jaime Teng wrote:
I have a MySQL table:
++--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
++--+--+-+-++
| id
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;
---
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:
++--+--+-+-+-
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:
++--+--+-+-+-
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.
I have a MySQL table:
++--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
++--+--+-+-++
| id | int(10) unsigned | | PRI | NULL