SELECT t1.field1, t21.Description AS Description1, t1.field2, t22.Description AS Description2 FROM table1 t1 JOIN table2 t21 ON t21.code = t1.field1 JOIN table2 t22 ON t22.code = t1.field2>The problem is I have a table that need the description of the other table with two fields:
> The table 1 has a record > Field1 Field2 > '001' '004' > '002' '001' > > The table 2 has a record > Code Description > '001' 'Sample 1' > '002' 'Sample 2' > '003' 'Sample 3' > '004' 'Sample 4' > > I need to get a SQL statement like this: > Field1Code Field1Description Field2Code Field2Description > '001' 'Sample 1' '004' 'Sample 4' > '002' 'Sample 2' '001' 'Sample 1'>