您好,我正在尝试在存储过程中使用 OR 语句,但它没有按照我希望的方式工作......
该语句的第一部分执行得很好,但似乎在 OR 之后所说的内容被忽略了......我认为它们必须是另一个词来代替 OR?
希望我在这里听起来不会很愚蠢..
这是我的存储过程:
SELECT DISTINCT Equipment.EquipmentNo, Equipment.EquipmentDescription AS [Description], Equipment.Barcode, Equipment.SerialNo AS [Serial Number], Equipment.Status
FROM Equipment, AssignEquipment
WHERE (Equipment.Status = 'Open' AND Equipment.Assigned = 'No') OR AssignEquipment.Assigned = 'No'
AND Equipment.EquipmentNo = AssignEquipment.EquipmentNo;