I have following two tables:
Table1:
-------
ID
Name
Table2:
-------
OwnerID
Address1
Address2
Address3
Table1.ID = "100" and the corresponding address record in Table2 is Table2.OwnerID = "C100". So if Table1.ID = "200" then Table2.OwnerID = "C200" and so on.
So the OwnerID field in Table2 doesn't have the identical value as the ID field in Table1 but it contains a prefix, "C" in this case.
Question: I would like to get the address record from Table2 for one or more IDs in Table1. How can I do that? Basically I want a result table that has Table1.ID, Table1.Name, Table2.Address1, Table2.Address2, and Table2.Address3.
Please let me know if you need more information to answer this question.
Will really appreciate some help.
Table1:
-------
ID
Name
Table2:
-------
OwnerID
Address1
Address2
Address3
Table1.ID = "100" and the corresponding address record in Table2 is Table2.OwnerID = "C100". So if Table1.ID = "200" then Table2.OwnerID = "C200" and so on.
So the OwnerID field in Table2 doesn't have the identical value as the ID field in Table1 but it contains a prefix, "C" in this case.
Question: I would like to get the address record from Table2 for one or more IDs in Table1. How can I do that? Basically I want a result table that has Table1.ID, Table1.Name, Table2.Address1, Table2.Address2, and Table2.Address3.
Please let me know if you need more information to answer this question.
Will really appreciate some help.