Associate
- Joined
- 19 Mar 2005
- Posts
- 569
Code:
SELECT *
FROM dbo.Staff
WHERE (Firstname LIKE '$value%') OR
(Lastname LIKE '$value%') OR
(FullName LIKE '$value%') AND
(compID <> '2')
I'm currently struggling with the above query, the query used to return the correct result but I have sinced changed the query to only show records with the compID that is not equal to 2. Now the query returns the same values as before but also shows the records with the compID of 2.
I have been doing some experimenting with the compID part of the query and that part of the query does not seem to be working at all. For example I changed the compID part to (compID = '2') and this showed 16 records when there should only be 1 displayed.
Hope I have explained this fully, if not feel free to ask any questions?