>>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
You are right. I need to create a better illustration of what am trying to do. Will do and post it then.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham