problem with views
Posted in 1998
These are our products
$isql -V
INFORMIX-SQL Version 4.12.UE1
$ i4gl -V
INFORMIX-4GL Version 4.10.UC2
and
RSAM Version 5.02.UC7
-----------------------------------
We have two databases, called historica and sucesion,
respectively.
We have in sucesion a table called pagano,
that is:
create table pagano
( dni_ci char(9) not null,
apenom char(40) not null,
fecha_nac date,
domicilio char(40),
prov char(2),
munic char(20),
codmun char(3),
codpost char(5),
telefono char(7),
zona_recaudacion char(2),
gestor char(1),
nivel_tercero char(2))
and in historica a view called pagano, constructed as follows
create view pagano (dni_ci,apenom,fecha_nac,domicilio,prov,munic,codmun,
codpost,telefono,zona_recaudacion,gestor,nivel_tercero) as
select x0.dni_ci ,x0.apenom ,x0.fecha_nac ,x0.domicilio ,x0.
prov ,x0.munic ,x0.codmun ,x0.codpost ,x0.telefono
,x0.zona_recaudacion
,x0.gestor ,'AL' from x_pagano x0 ;
being x_pagano:
create table x_pagano
(
dni_ci char(9),
apenom char(40),
fecha_nac date,
domicilio char(40),
prov char(2),
munic char(20),
codmun char(3),
codpost char(5),
telefono char(7),
zona_recaudacion char(2),
gestor char(1)
);
The problem we have is the following:
Next select:
select * from historica:pagano a where a.dni_ci="11111111H"
and not exists (select * from pagano b where b.dni_ci=a.dni_ci)
works correctly, but next
select * from historica:pagano a where a.dni_ci="11111111H"
and a.dni_ci not in (select b.dni_ci from pagano b where
b.dni_ci=a.dni_ci)
gets the error:
392 System-error unexpected null pointer encountered
Can anybody give us a help?