Two related questions. 1. I have a table with a "date" field. (Ex: '04/13/2002'). I want to get a list of all UNIQUE values for that field (many entries from the same day), i.e., all days with entries. ************************************** CREATE TABLE metrics_events_power { mep_id int(11) NOT NULL auto_increment, mep_date text, mep_time time DEFAULT '00:00:00' NOT NULL } INSERT INTO metrics_events_power VALUES ('1', '04/13/2002', '10:41:19'); INSERT INTO metrics_events_power VALUES ('1', '04/13/2002', '10:46:19'); INSERT INTO metrics_events_power VALUES ('1', '04/14/2002', '11:51:19'); **************************************
I want a query that returns for this data '04/13/2002' and '04/14/2002'. 2. Now I have X tables with those date fields. How do I get a list from all specified tables with the unique dates from them? For instance, 2 more tables: ************************************** CREATE TABLE arf_events_power { aep_id int(11) NOT NULL auto_increment, aep_date text, aep_time time DEFAULT '00:00:00' NOT NULL } INSERT INTO arf_events_power VALUES ('1', '05/13/2002', '10:41:19'); INSERT INTO arf_events_power VALUES ('1', '05/24/2002', '10:46:19'); INSERT INTO arf_events_power VALUES ('1', '06/21/2002', '11:51:19'); CREATE TABLE blah_events_power { bep_id int(11) NOT NULL auto_increment, bep_date text, bep_time time DEFAULT '00:00:00' NOT NULL } INSERT INTO blah_events_power VALUES ('1', '04/13/2002', '10:41:19'); INSERT INTO blah_events_power VALUES ('1', '04/13/2002', '10:46:19'); INSERT INTO blah_events_power VALUES ('1', '07/28/2002', '11:51:19'); ************************************** Should return 6 dates: '04/13/2002' '04/14/2002' '05/13/2002' '05/24/2002' '06/21/2002' '07/28/2002' -- Mark Wilson, Computer Programming Unlimited (cpuworks.com) Web : http://cpuworks.com Tel: 410-549-6006 Email: [EMAIL PROTECTED] Fax: 410-549-4408 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]