Subject Re: [ib-support] Please help. View is empty, but the same SELECT works!
Author Andrew Guts
Svein Erling Tysvaer wrote:

>Well, beats me - the only thing I could think of was your use of USER in
>the last join and possibly moving that to the WHERE clause, but you say
>that doesn't influence anything. My only recommendation would be to keep
>trimming things down and then start adding once you find a damaging part.
>Then ask again highlighting the line of code causing you problems. By the
>way, you do not have any entries with p.rate = 0 (shooting in the dark)?
>And have you verified that the SELECT actually return all rows?
>
>
>
Do you think about division by zero? No, all checked.
This is simplified version:

select d.DepID,
cast(d.Bank||' '||d.AccountNo as varchar(64)) as Descr
from DepRights r
inner join departments d on r.DepID = d.DepID
_________________
12 rows

create view vDeps1 (DepID, Descr) as
select d.DepID,
cast(d.Bank||' '||d.AccountNo as varchar(64)) as Descr
from DepRights r
inner join departments d on r.DepID = d.DepID;

select * from vDeps1
________________
0 rows

I guess I'll be surprised when I reboot the server at night. :-))