Hi all,

I have a problem with a select returning duplicates, even though there
aren't any duplicates in the database.

select 
  e.EventID, 
  date_format(e.EventDate, '%c/%d/%y') as EventDate, 
  e.EventTime, 
  v.VenueName, 
  v.VenueID 
from 
  events e, 
  venues v;


+---------+-----------+-----------+-----------------+---------+
| EventID | EventDate | EventTime | VenueName       | VenueID |
+---------+-----------+-----------+-----------------+---------+
|       2 | 3/06/04   | 09:00:00  | The Bombshelter |       1 |
|       3 | 3/12/04   | 09:00:00  | The Bombshelter |       1 |
|       2 | 3/06/04   | 09:00:00  | Goodtimes       |       2 |
|       3 | 3/12/04   | 09:00:00  | Goodtimes       |       2 |
+---------+-----------+-----------+-----------------+---------+

I tried adding a "distinct" to the above select, which had no effect.  I
also ran an "explain" on the query:

+-------+------+---------------+------+---------+------+------+-------+
| table | type | possible_keys | key  | key_len | ref  | rows | Extra |
+-------+------+---------------+------+---------+------+------+-------+
| e     | ALL  | NULL          | NULL |    NULL | NULL |    2 |       |
| v     | ALL  | NULL          | NULL |    NULL | NULL |    2 |       |
+-------+------+---------------+------+---------+------+------+-------+

Which tells me nothing.  What have I done wrong here?

-Erich-



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to