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

>Oh, good, now it is easier to ask questions. Is Bank and AccountNo declared
>as varchar or char or does any of them happen to be integer or even blob?
>
>Set
>
>
>
>>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
>>
>>
create table departments
(DepID smallint not null primary key,
SubjID integer not null references Subjects (ID),
Bank varchar(40),
AccountNo varchar(20),
...
);

Real data in "departments" contains 4 records. All cells "Bank" and
"AccountNo" filled.

create table DepRights (
DepID smallint not null references Departments (DepID),
SubjID integer not null references Subjects (ID),
...
primary key(DepID, SubjID)
);