Can this be done?

From: sheldonlg <sheldonlg_at_thevillages.net>
Date: Sun, 07 Aug 2011 16:55:38 -0400
Message-ID: <j1mudq$kfm$1_at_dont-email.me>



I have two tables
A: field1, field2
B: field1, field2

field2 always has a value in table A.
table B may or may not have a record with a value of field1 matching that of table A.

I want to get the value of field2. I want the value for the record with the value of field1 to come from Table B if there is a record there for that value of field1, otherwise I want the value to come from table A.

If that is confusing, here is an example:

Table A

field1     field2
101         39
102         75
103         94
104         66

Table B
field1     field2
102         81
104         67

I want the results to be for the query for records where field1 IN (101,102) obtained to be

field1     field2
101         39
102         81

Any hints?

-- 
Shelly
Received on Sun Aug 07 2011 - 15:55:38 CDT

Original text of this message