Selecting correct values in Where Clause
Hello!!
I am writing a Select statement to return a customer name, city and province/state. Our customers can have multiple address types, e.g. Mailing, Billing and Shipping, but may not have all types. I want the Shipping address, if it exists, otherwise I want the Mailing address; one or both of these will exist. I am not sure how to write the Where clause to accomplish this. A customer is linked to the address table using a customer id and each address row will have an address type id. Any help would be greatly appreciated!! Thanks!