MEMBER table with primary key MEMBER_ID and MEMBER_PHONE table for MEMBER_ID as foreign key and PHONE_IND as one of column with values ‘S’ (Secondary Phone) or ‘P’ (Primary Phone) along with phone number details. ‘S’ is our key value.
I need oracle query to fetch the Member information with phone if ‘S’ exists, if not ‘P’ phone number.
In MEMBER_PHONE table every member will have two possible rows of ‘S’ and ‘P’, if not atleast ‘P’ as one row.
Thanks in advance for your help.
EDIT
I think know I understood…