Subject Re: [firebird-support] Selectable procedure and join
Author Milan Babuskov
Elmar Haneke wrote:
>>select ...
>>from some_table t, some_procedure p
>>where t.foo = p.foo
>
> Ok, that does work for select statements.
>
> But, it cannot be placed into an VIEW. In "CREATE VIEW" Firebird does
> complain about missing table "some_procedure".

Views need something "solid" to look onto :). If you need such
functionality, create a simple selectable SP instead of view. Something
like this:

create view bar(a, b, c)
as
select a, b, c
from some_table t, some_procedure p
where t.foo = p.foo

can become:

create procedure bar
returning (a, b, c)
as
begin
for select a, b, c
from some_table t, some_procedure p
where t.foo = p.foo
into :a, :b, :c
do suspend;
end

And you can use it the same way you use view (except that you can't have
triggers on it).

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org