On 7/7/07, Mitchell Vincent <[EMAIL PROTECTED]> wrote:
I have a query to get all states that a user might have entered, it is : SELECT DISTINCT customers.bill_state as the_result from customers UNION SELECT DISTINCT invoice_master.bill_state FROM invoice_master UNION SELECT DISTINCT customers.ship_state from customers UNION SELECT DISTINCT invoice_master.ship_state from invoice_master; Can anyone help speed this query up for large(r) data sets or a suggest a more efficient way of getting the unique list of states? I'd sure appreciate it! Thanks!
On the other hand, you could merely enter the Fifty States (and provinces, protectorates, commonwealths, etc) into a lookup table, and select from that much faster. :) --andy