>Hi,
>
>I am wondering if possible to make One SQL Select that will get me the desired query.
>
>Example:
>Two tables:
>Table 1:
>
>ID_FIELD PK_FIELD
>'ABC' 1
>'NBC' 2
>'ABC' 3
>'NBC' 4
>
>
>Table 2
>
>FOREIGN_PK OTHER FIELDS
>1
>2
>3
>1
>
>
>I want to select records from Table 1 that have FOREIGN_PK matching the Table 1 PK_FIELD or ID_FIELD
>For example, the resulting query for FOREIGN_PK of 1 would be:
>
>
>ID_FIELD PK_FIELD FOREIGN_PK
>'ABC' 1 1
>'ABC' 3 1
>
>
>The challenge for me is that the ID_FIELD 'ABC' has PK_FIELD 3 which does not match the FOREIGN_PK of 1 but I want to include it in the resulting query.
>
>How would I create a SQL Select for the above task? TIA
I think we need to see more data and more desired results. I don't fully understand what you're looking for here.
Tamar