I have the following query:
Shift consist of Blue, Green, Red and Yellow
Equipment consist of 7301, 7302 and 7303
SELECT Downtime, Shift, Equipment
FROM Report
WHERE (Shift = ?) OR
(Equipment = ?)
Lets say I ask for Yellow and don't put in anything for equipment. I get back all yellow and all equipment. Works fine until I add the equipment, then I get back all shifts along with all related equipment. I have tried changing the ' OR ' to an ' AND ' but then it requires me to fill in both fields. If I put in a shift thats not one of the 4 then I get back nothing. Ideas?
The query is built through a VB.Net windows form. I hope this is still relivent to this forum.
Thanks
Shift consist of Blue, Green, Red and Yellow
Equipment consist of 7301, 7302 and 7303
SELECT Downtime, Shift, Equipment
FROM Report
WHERE (Shift = ?) OR
(Equipment = ?)
Lets say I ask for Yellow and don't put in anything for equipment. I get back all yellow and all equipment. Works fine until I add the equipment, then I get back all shifts along with all related equipment. I have tried changing the ' OR ' to an ' AND ' but then it requires me to fill in both fields. If I put in a shift thats not one of the 4 then I get back nothing. Ideas?
The query is built through a VB.Net windows form. I hope this is still relivent to this forum.
Thanks