Guest_imported
New member
- Jan 1, 1970
- 0
Hello!
I would like to JOIN 2 tables, but I have encountered problems. This is why...
I have 2 tables:
- TableA contains information about members of an association
- TableB contains information about companies in my region
So far so good... But the problem is that I have 2 fields in TableA that relate to the SAME primary key in Table2 - so TableB's primary key is a foreign key twice in TableA.
My structure (simplified is)
TableA(
IdA,
Name,
Surname,
Employed_Company_ID,
Mailing_Company_ID,
...)
TableB(
IdB,
Company,
Street,
...)
Employed_Company_ID is a filed containing information about where a person is employed and Mailing_Company_ID contains information about the company where the member wants us to send him brochures,... (it seems odd, but to a lot of members we send stuff to a company where they are not employed).
How can I join the tables?
Thanky you,
Rok
I would like to JOIN 2 tables, but I have encountered problems. This is why...
I have 2 tables:
- TableA contains information about members of an association
- TableB contains information about companies in my region
So far so good... But the problem is that I have 2 fields in TableA that relate to the SAME primary key in Table2 - so TableB's primary key is a foreign key twice in TableA.
My structure (simplified is)
TableA(
IdA,
Name,
Surname,
Employed_Company_ID,
Mailing_Company_ID,
...)
TableB(
IdB,
Company,
Street,
...)
Employed_Company_ID is a filed containing information about where a person is employed and Mailing_Company_ID contains information about the company where the member wants us to send him brochures,... (it seems odd, but to a lot of members we send stuff to a company where they are not employed).
How can I join the tables?
Thanky you,
Rok