Subject Interbase 6.0 bug ?
Author Fabrice Vendé - INFOCOB
Hello,

Can someone explain me this problem.

I have two table :
Create Table ToDoList
(
Code Varchar(15) Not NULL,
User Varchar(15),
Date DateTime,
..
Primary key(Code)
)

A ToDoListDone which have the same structure as ToDoList
with a new field CodeFrom Varchar(15) which contain the source code of
ToDoList (When something to do become done).

The strange result :

Query1=
Select * from ToDoList
=> return me 15 records.

When a Query2=
Select * from ToDoList
where ToDoList.code in (select codefrom from ToDoListDone);
=> Return me 2 records

A Query3=
Select * from ToDoList
where ToDoList.code not in (select codefrom from ToDoListDone);
=> return me 0 record !!!!!

Can somebody explain me why not Query1=Query2+Query3 ?

I have found a solution:
Select * from ToDoList
where ToDoList.code not in (select codefrom from ToDoListDone where codefrom
is not null);
=> retourn me 13 records, and Query1=Query2+Query3 !!!!

Is it a bug ?


Fabrice Vende
fabrice@...

-
SARL I N F O C O B
Developpement, formation, matériel, logiciel
http://www.infocob.com