Query to select records

Hugo

New member
Local time
Yesterday, 20:34
Joined
Aug 30, 2002
Messages
9
Hi, I have a data base with Customer records, some of them have a bill to address and a ship to address and some have only a bill to address. How can I do to create a query that would select "Ship to addresses only (if both exist) and bill to address (if there is not a ship to address)

Thank you in advance
 
Select ..., IIf(IsNull(ShipToAddr), BillToAddr, ShipToAddr) As Addr, IIf(IsNull(ShipToCity), BillToCity, ShipToCity) As City, ....
 

Users who are viewing this thread

Back
Top Bottom