Subject | Re: Bug in firebird 1.5?? left joining |
---|---|
Author | johnsparrowuk |
Post date | 2004-03-18T10:11:37Z |
As a workaround, doing:
select person from currentpeople where person not in (select person
from finishedpeople)
seems to work ok - so I least I've got my system up and running again
(obviously not real table names!)
John
--- In firebird-support@yahoogroups.com, "johnsparrowuk"
<jsparrow@e...> wrote:
select person from currentpeople where person not in (select person
from finishedpeople)
seems to work ok - so I least I've got my system up and running again
(obviously not real table names!)
John
--- In firebird-support@yahoogroups.com, "johnsparrowuk"
<jsparrow@e...> wrote:
> Is this a bug??not
>
> ===============
>
> create table mytable (person varchar(20) not null, status integer
> null, primary key (person,status));c.person
>
> create view currentpeople as select distinct person from mytable
> where status = 1;
> create view finishedpeople as select distinct person from mytable
> where status = 2;
>
>
> insert into mytable values ('john',1);
> insert into mytable values ('john',2);
> insert into mytable values ('fred',1);
>
>
>
> /* This works fine: fred-null, john-john */
> select * from currentpeople c left join finishedpeople f on
> = f.personc.person
>
>
> /* This is as expected too: john-john */
> select * from currentpeople c left join finishedpeople f on
> = f.personjohn-
> where f.person = 'john'
>
> /* WHATS HAPPENING HERE????? fred-null, JOHN-NULL where does the
> null come from???*/c.person
> select * from currentpeople c left join finishedpeople f on
> = f.personwasn't
> where f.person is null
>
> ===============
>
> Firebird 1.5 SS, Windows 2000 and XP, dialect 3 db.
>
> Took me 3 hours of tracing through stored procedures to fine I
> being stupid!
>
> Thanks,
>
> John