LawnBoy
MIS
- Mar 12, 2003
- 2,881
I have a table of people's first and last names and employee #. I want to show everybody except Joe Blow. My TSQL is
My problem is that I'm not getting a logical AND, I'm getting a logical OR. It doesn't report Joe Blow, but it also doesn't report Jane Blow or Joe Smith.
I've tried using != instead of <>, same results.
Can someone spare half a brain cell and show me what I'm doing wrong?
TIA.
Code:
SELECT LNAME, FNAME FROM TABLE
WHERE FNAME <> 'JOE'
AND LNAME <> 'BLOW'
ORDER BY LNAME;
My problem is that I'm not getting a logical AND, I'm getting a logical OR. It doesn't report Joe Blow, but it also doesn't report Jane Blow or Joe Smith.
I've tried using != instead of <>, same results.
Can someone spare half a brain cell and show me what I'm doing wrong?
TIA.