I'm trying to join two tables where table 1 is pulling values from table 2 and storing them in separate columns. To describe the situation:
Table 1
[ID][Name][TBL2_ID_Field1][TBL2_ID_Field2]
1 XYZ 3 4
Table 2
[ID][Type][Description1][Description2]
3 AA TEST TEST
4 BB TEST2 TEST2
I need the table to display something like:
[ID][Name][TBL2_ID_Field1_DESC1][TBL2_ID_Field2_DESC1]
1 XYZ TEST TEST2
Querying as...
SELECT tbl1.id, tbl1.name, tbl2.description1 as "tbl2_id_field1_desc1", tbl2.description1 as "tbl2_id_field2_desc1"
FROM Table1 tbl1, Table2 tbl2
WHERE tbl1.tbl2_id_field1 = table2.id
AND tbl1.tbl2_id_field2 = table2.id
is obviously not working but I'm not sure what else to try.
Any help is appreciated! Please let me know if I haven't clarified enough.