Hi,
Maybe this is a stupid question, but I think this should be pretty straight forward. I have some rows in a table, and I want to select all of the rows that matches an given criteria and does NOT match another.
So far I have
SELECT field1...fieldN FROM table WHERE [employeeId] = '" & empId & "' AND [ProductionNumber] <> '" & BlendCode & "';
Since this is a test table, there are only two rows in it. The above query returns both rows, even though it shouldn't, because one of them has the value of BlendCode in ProductionNumber. The same query works properly as a stored procedure. Doesn't matter what order I put the conditions in, and I can't seem to get it to work using brackets or parenthesis either.
System is Access97.
Why is the <> condition being ignored?
MANY MANY thanks,
Kendall
Maybe this is a stupid question, but I think this should be pretty straight forward. I have some rows in a table, and I want to select all of the rows that matches an given criteria and does NOT match another.
So far I have
SELECT field1...fieldN FROM table WHERE [employeeId] = '" & empId & "' AND [ProductionNumber] <> '" & BlendCode & "';
Since this is a test table, there are only two rows in it. The above query returns both rows, even though it shouldn't, because one of them has the value of BlendCode in ProductionNumber. The same query works properly as a stored procedure. Doesn't matter what order I put the conditions in, and I can't seem to get it to work using brackets or parenthesis either.
System is Access97.
Why is the <> condition being ignored?
MANY MANY thanks,
Kendall