-------------- SELECT version() -------------- +-------------------------+ | version() | +-------------------------+ | 5.0.45-community-nt-log | +-------------------------+ 1 row in set (0.00 sec) -------------- DROP TABLE IF EXISTS tblGeoStateCA -------------- Query OK, 0 rows affected, 1 warning (0.01 sec) -------------- CREATE TABLE tblGeoStateCA SELECT DISTINCT PUBACC_FR.frequency_assigned , PUBACC_FR.call_sign , PUBACC_HD.license_status , PUBACC_HD.radio_service_code , PUBACC_FR.class_station_code , PUBACC_LO.location_state , PUBACC_LO.location_county , PUBACC_LO.location_city , PUBACC_LO.location_address , PUBACC_LO.location_name , tblGeoStateCA1.contact_licensee , PUBACC_EN.entity_name , PUBACC_EN.state , PUBACC_EN.city , PUBACC_EN.street_address , PUBACC_CP.state_code , PUBACC_CP.control_county , PUBACC_CP.control_city , PUBACC_CP.control_address , PUBACC_CP.control_phone , PUBACC_FR.cnt_mobile_units , PUBACC_FR.cnt_mob_pagers , PUBACC_FR.db_id FROM PUBACC_LO LEFT JOIN PUBACC_CP ON PUBACC_LO.call_sign=PUBACC_CP.call_sign INNER JOIN PUBACC_EN ON PUBACC_LO.call_sign=PUBACC_EN.call_sign INNER JOIN PUBACC_HD ON PUBACC_LO.call_sign=PUBACC_HD.call_sign INNER JOIN PUBACC_FR ON PUBACC_LO.call_sign=PUBACC_FR.call_sign LEFT JOIN tblGeoStateCA1 ON PUBACC_LO.call_sign=tblGeoStateCA1.call_sign WHERE (PUBACC_EN.entity_type = 'L') AND (location_state='CA' OR state='CA' OR state_code='CA') ORDER BY PUBACC_FR.frequency_assigned, PUBACC_FR.call_sign, PUBACC_HD.license_status, PUBACC_HD.radio_service_code, PUBACC_FR.class_station_code, PUBACC_LO.location_state, PUBACC_LO.location_county, PUBACC_LO.location_city, PUBACC_LO.location_address -------------- Query OK, 1540538 rows affected (2 hours 4 min 31.25 sec) Records: 1540538 Duplicates: 0 Warnings: 0 Bye