Re: query without records
Quote:
Originally posted by raf
no row select ( there are rows with flag=1 and cod<>'M')
No, there obviously aren't any such rows! I bet the only combinaton you have there are:
- flag=1, cod='M'
and/or
- flag=1, cod IS NULL !!!!
If something is NULL, then you can't say it's <>'M'.
Re: Re: query without records
Quote:
Originally posted by jmodic
No, there obviously aren't any such rows! I bet the only combinaton you have there are:
- flag=1, cod='M'
and/or
- flag=1, cod IS NULL !!!!
If something is NULL, then you can't say it's <>'M'.
ok jmodic
is correct this?
SELECT A.COD, A.FLAG, B.AREA, B.NUM_ID
FROM TAB A, TAB1 B
WHERE A.ID=B.ID
AND ((FLAG=1 AND nvl(COD, 'S') <> 'M') OR (FLAG=2 AND COD = 'N'))
Re: Re: Re: query without records
Quote:
Originally posted by raf
[B]ok jmodic
is correct this?
Hm, you tell me.... You know your data, you know what you expect from your query - I don't know that. I'm only guessing, becuse you haven't explained neither of those two things sufficiently.