I'm running a query similar to:
select addrid, addrline1, addrcity, addrstate, addrzip from address
where addrflag1 = 'Y' //mandatory
and addrflag2 = 'N' //mandatory
and addrflag3 = 'N' //mandatory
and addrflag4 = 'g' //mandatory
and addrtype in ('h','b') //either home or business address
Since it's possible for both, home and business address to meet the mandatory criteria, I may get results with both address. I want to get the business address if and only if the home address is not selected.
How do I go about doing that?
Start Free Trial