Link to home
Start Free TrialLog in
Avatar of Mark1M
Mark1MFlag for United States of America

asked on

Selecting data from either of two tables if a key exists

Hi Everyone,

I have a question on how to select data when it exists in either of two tables.

Example:  I have table 'A' that contains the main key (serial number). Table B will have a corresponding record for that key. Table C may have an entry with the matching key.   I would like to using the key from table 'A', extract data from Table 'C' if a matching key exists, otherwise extract data from Table 'B'. NOTE: Table 'B' will always have a matching key/entry, Table 'C' contains only updates for certain keys.

Thanks in advance!
SOLUTION
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Member_2_2484401
Member_2_2484401
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark1M

ASKER

Hi momi_sabag,

Thank you for your response and solution.
Avatar of Mark1M

ASKER

Hi Dave,

Thank you for your response and solution.

Works great!