Einzelnen Beitrag anzeigen

hirnstroem

Registriert seit: 21. Sep 2005
297 Beiträge
 
Delphi 2006 Professional
 
#3

Re: INNER JOIN und LEFT JOIN verschachteln

  Alt 28. Nov 2006, 14:39
Weil es folgendermassen sein muss!

SQL-Code:
SELECT *
FROM
(Device_Key RIGHT JOIN
  (Room INNER JOIN
    (Floor INNER JOIN
      (DeviceType INNER JOIN
        (Building INNER JOIN
          (Application INNER JOIN
            Device
          ON [Application].[ApplicationID] =[Device].[ApplicationID])
        ON [Building].[BuildingID] =[Device].[BuildingID])
      ON [DeviceType].[DeviceTypeID] =[Device].[DeviceTypeID])
    ON [Floor].[FloorID] =[Device].[FloorID])
  ON [Room].[RoomID] =[Device].[RoomID])
ON [Device_Key].[DeviceID] = [Device].[DeviceID])
WHERE
DeviceType.DeviceType LIKE :DeviceType
AND
Application.Application LIKE :Application
AND
Building.Building LIKE :Building
AND
Floor.Floor LIKE :Floor
AND
Room.Room LIKE :Room
AND
Active = True
ORDER BY Address;
inde deus abest
  Mit Zitat antworten Zitat