1

一番上の行にマウスオーバーしたときに条件が予想されるコンテキストで指定された非ブール型の式は、画像を参照してください。

SQL 画像の問題

SELECT Bookings.Date, Bookings.Timebegan, Bookings.Timefinished, Bookings_1.Date, Bookings_1.Timebegan, Bookings_1.Timefinished, 
              Bookings.RoomID, Bookings_1.RoomID
FROM     Bookings,
              Bookings AS Bookings_1
WHERE Not Nz(([Bookings_1].[Timebegan]>=[Bookings].[Timefinished]) Or
  ([Bookings_1].[Timefinished]<=[Bookings].[Timebegan]) Or
  ([Bookings].[RoomID]!=[Bookings_1].[RoomID]) Or
  ([Bookings].[ID]=[Bookings_1].[ID]),False)
ORDER BY Bookings.ID, Bookings_1.ID;

誰にもアイデアはありますか?

4

1 に答える 1

0

ナイスななぞなぞ (De Morgan の法則のリマインダー ;])。これを試して:

WHERE  
    (
        [Bookings_1].[Timebegan] is NULL
        OR [Bookings].[Timefinished] is NULL
        OR [Bookings_1].[Timefinished] is NULL
        OR [Bookings].[Timebegan] is NULL
        OR [Bookings].[RoomID] is NULL
        OR [Bookings_1].[RoomID] is NULL
        OR [Bookings].[ID] is NULL
        OR [Bookings_1].[ID] is NULL
        OR 
        (
         [Bookings_1].[Timebegan]<[Bookings].[Timefinished]
         AND [Bookings_1].[Timefinished]>[Bookings].[Timebegan] 
         AND [Bookings].[RoomID]=[Bookings_1].[RoomID]
         AND [Bookings].[ID]<>[Bookings_1].[ID]
        )
    )
于 2013-03-12T00:51:57.693 に答える