Subject | Re: [ib-support] problem with query |
---|---|
Author | Helen Borrie |
Post date | 2003-04-17T06:33:12Z |
At 02:09 PM 17/04/2003 +0800, you wrote:
value. It is not equivalent to anything, not even to Null.
If you want to get the ones where lostsales is null, do this:
select * from salesorder where lostsales <>'YES' or lostsales is null
heLen
>i'm using firebird 1.02Because null and <> 'YES' are not equivalent. Null is a state, not a
>i got this table "salesOrder"
>and field
>salesOrderNo(integer),custid(integer),transdate(date),lostsales(varchar 256)
>
>with this sql statement
>select * from salesorder where lostsales ='YES'
>i can get my result
>
>but when i used this sql statement
>select * from salesorder where lostsales <>'YES'
>
>then i receive no record from the tables.
>i 'm very sure that there is records with field (lostsales ) as null.
>
>why is it so???
value. It is not equivalent to anything, not even to Null.
If you want to get the ones where lostsales is null, do this:
select * from salesorder where lostsales <>'YES' or lostsales is null
heLen