-
query without records
Hi,
I run this query
SELECT A.COD, A.FLAG, B.AREA, B.NUM_ID
FROM TAB A, TAB1 B
WHERE A.ID=B.ID
AND ((FLAG=1 AND COD <> 'M') OR (FLAG=2 AND COD = 'N'))
With this query I get:
no row select ( there are rows with flag=1 and cod<>'M')
but if I run this query:
SELECT A.COD, A.FLAG, B.AREA, B.NUM_ID
FROM TAB A, TAB1 B
WHERE A.ID=B.ID
AND (FLAG=1 AND OR (FLAG=2 AND COD = 'N'))
I get rows
What I wrong??
Thanks
Raf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|