Subject | Re: [firebird-support] Selectable procedure and join |
---|---|
Author | Milan Babuskov |
Post date | 2004-10-06T14:35:22Z |
Elmar Haneke wrote:
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
>>select ...Views need something "solid" to look onto :). If you need such
>>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".
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