Hello,
I would greatly appreciate if someone could tell me what is wrong with this query. I am getting a JOIN error. It was working fine, then I added another lookup table to it.
The problematic sql is:
What have I done wrong? Parentheses? Fields out of order (btw, do they need to be in any particular order on the joins?).
This is the query that works fine, before my attempt to add another table. The table I added is tlkpRoomCategory.
I have been struggling and struggling and changing it, all to no avail. Any pointers?
Many thanks in advance...
Lori
I would greatly appreciate if someone could tell me what is wrong with this query. I am getting a JOIN error. It was working fine, then I added another lookup table to it.
The problematic sql is:
Code:
SELECT tblRoomItems.RoomID AS Room,
tblSpaceUse.RoomTypeID AS [Room Type],
tblSpaceUse.RoomLocation AS Location,
tblSpaceUse.HousingGuestracClassif AS [Guestrac Code],
tblItems.ItemDesc AS Showerhead,
tlkpCondition.ConditionDesc AS Cond
FROM tblSpaceUse
INNER JOIN (tlkpItemSubcategory
INNER JOIN (tblItems
INNER JOIN (tblRoomItems
INNER JOIN (tlkpRoomCategory
INNER JOIN tlkpCondition ON tblRoomItems.ConditionID = tlkpCondition.ConditionID)
ON tblSpaceUse.RoomCategoryID = tlkpRoomCategory.RoomCategoryID)
ON tblItems.ItemID = tblRoomItems.ItemID)
ON tlkpItemSubcategory.ItemSubcatID = tblItems.ItemSubcategoryID)
ON tblSpaceUse.RoomID = tblRoomItems.RoomID
WHERE (((tlkpItemSubcategory.ItemSubcatID)='shrhd'));
This is the query that works fine, before my attempt to add another table. The table I added is tlkpRoomCategory.
Code:
SELECT tblRoomItems.RoomID AS Room, tblSpaceUse.RoomCategoryID,
tblSpaceUse.RoomTypeID AS [Room Type], tblSpaceUse.RoomLocation AS Location, tblSpaceUse.HousingGuestracClassif AS [Guestrac Code], tblItems.ItemDesc AS Showerhead, tlkpCondition.ConditionDesc AS Cond
FROM tblSpaceUse
INNER JOIN (tlkpItemSubcategory
INNER JOIN (tblItems
INNER JOIN (tblRoomItems
INNER JOIN tlkpCondition
ON tblRoomItems.ConditionID = tlkpCondition.ConditionID) ON tblItems.ItemID = tblRoomItems.ItemID)
ON tlkpItemSubcategory.ItemSubcatID = tblItems.ItemSubcategoryID)
ON tblSpaceUse.RoomID = tblRoomItems.RoomID
WHERE (((tlkpItemSubcategory.ItemSubcatID)='shrhd'));
Many thanks in advance...
Lori