Displaying a value when another value is blank...kind of.

Tacec

Member
Joined
Jun 14, 2005
Messages
18
Location
Renton, WA
Programming Experience
1-3
Please forgive, I'm somewhat of a newbie in the SQL world, so the answer to this could be perfectly obvious to you pros out there...

I have a table with address information for our clients. Each client can have multiple addresstypes, and therefore multiple addresses associated with their ID number.

What I'd like to do is to only display address1, unless address1 is blank; then i'd like to display address2. But if both address1 and address2 are populated, only display address1.

Address1 is noted by 'X' addresstype and Address2 is noted by 'Y' addresstype.

Do i need to include more info? I'm having to join 4 tables to do this, so it's getting pretty hairy as it is.

Any help would be greatly appreciated!! Thanks!
 
Back
Top