Subject Unexpected behavior in subquery
Author Alex Castillo
Hello,

I've been using Fb 2.0.1 and now 2.1 and I got an unexpected behavior in the next queries:

1.-
SELECT FOLIOVENTA FROM VENTAMOSTRADOR
RESULT 822 ROWS (CORRECT)

2.-
SELECT FOLIOVENTA FROM CONTRATOTARIFARIO WHERE FOLIOVENTA IS NOT NULL
RESULT 107 ROWS (CORRECT)

3.- *********** unexpected ***************
SELECT folioventa from VENTAMOSTRADOR WHERE
folioventa not in (SELECT folioventa from CONTRATOTARIFARIO)
0 ROWS (WRONG !!!!!!!!!! )

4.- ********** correction ****************
SELECT folioventa from VENTAMOSTRADOR WHERE
folioventa not in (SELECT folioventa from CONTRATOTARIFARIO where folioventa is not NULL)
715 ROWS (CORRECT)

Why subquery doesn't work if I don't filter by not null?

Field FOLIOVENTA is Bigint.

Is this as you expected?

Thanks in advance.

Regards.
_______________________________
I'm free, I use GNU/Linux.
Close your Windows, Open your mind.

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.yahoo.com.mx/