J
JohnH
Hello,
I am having problems trying to find a query that perfoms the following:
I have two tables defined as follows (excuse the SQL Server syntax)
CREATE TABLE [Rooms] (
[Room_ID] [Number],
[FirstTable] [Number],
[SecondTable] [Number],
)
CREATE TABLE [TableTypes] (
[Table_ID] [Number],
[Description] [Text],
)
Each room record contains a room id (key) and two table type id's. The
table type id's are not necessarily populated so thats where i think a
left join would be useful. What I want to do is display each row of the
rooms table with a table description instead of a table_ID.
The query i have at the moment is:
SELECT rooms.Roomid, rooms.firsttable, b.Description
FROM rooms LEFT JOIN tabletypes AS b ON rooms.FirstTable=b.table_ID;
But this doesn't show the SecondTable column description if you see what
I mean. I am using MS Access 2002 on XP.
Any help is much apreciated, thanks.
I am having problems trying to find a query that perfoms the following:
I have two tables defined as follows (excuse the SQL Server syntax)
CREATE TABLE [Rooms] (
[Room_ID] [Number],
[FirstTable] [Number],
[SecondTable] [Number],
)
CREATE TABLE [TableTypes] (
[Table_ID] [Number],
[Description] [Text],
)
Each room record contains a room id (key) and two table type id's. The
table type id's are not necessarily populated so thats where i think a
left join would be useful. What I want to do is display each row of the
rooms table with a table description instead of a table_ID.
The query i have at the moment is:
SELECT rooms.Roomid, rooms.firsttable, b.Description
FROM rooms LEFT JOIN tabletypes AS b ON rooms.FirstTable=b.table_ID;
But this doesn't show the SecondTable column description if you see what
I mean. I am using MS Access 2002 on XP.
Any help is much apreciated, thanks.