Subject | Re: Parametrized View |
---|---|
Author | Adam |
Post date | 2005-12-24T06:09:26Z |
--- In firebird-support@yahoogroups.com, "Marcelo" <pcpower099@y...>
wrote:
record every time suspend is called.
Here is an example
create procedure sp_getallemployees
(
name varchar(50)
)
returning
(
id integer,
dob timestamp
)
as
begin
for
select id, dob
from employee
where upper(name) = upper(:name)
into :id, :dob
do
begin
suspend;
end
end
^
This is called by
select *
from sp_getallemployees('Adam');
This is more powerful then a "paramatised view", as you can perform
operations, raise exceptions etc
Adam
wrote:
>Stored Procedures are able to return multiple records. They return a
> Hi all!
>
> Is there any way to have a parametrized view?
> I used an sp but for a single record output data. Now I wanna do the
> same but the output parameter consist of a few records.
record every time suspend is called.
Here is an example
create procedure sp_getallemployees
(
name varchar(50)
)
returning
(
id integer,
dob timestamp
)
as
begin
for
select id, dob
from employee
where upper(name) = upper(:name)
into :id, :dob
do
begin
suspend;
end
end
^
This is called by
select *
from sp_getallemployees('Adam');
This is more powerful then a "paramatised view", as you can perform
operations, raise exceptions etc
> PD: thanks Adam for your answer to the code protection methods !!!No problems.
>
Adam