Subject | Re: [firebird-support] Multiple select inside procedures??? |
---|---|
Author | Martijn Tonies |
Post date | 2005-04-29T18:08:39Z |
> I'm trying to figure out how to get a procedure to return more than onerow. I
> know that this procedure does not work because it is supposed to returnFOR SELECT ... -> will start a loop
> multiple rows and this one can't. So - how is it to be re-written som it
> works?
>
> CREATE PROCEDURE SEL_PROC_V_PRESENTASJON (
> IN_KAT VARCHAR (100))
> RETURNS (
> V_ID_KATEGORI INTEGER,
> V_KATEGORI VARCHAR (100),
> V_ID_LEVERANDOR INTEGER,
> V_LEVERANDOR VARCHAR (100),
> V_URL VARCHAR (254),
> V_KALKURL VARCHAR (254),
> KAT_CNT INTEGER)
> AS
> BEGIN
> select ID_KATEGORI, KATEGORI, ID_LEVERANDOR,DO SUSPEND;
> LEVERANDOR, URL, KALKURL
> from view_presentasjon
> where kategori like :in_kat
> order by kategori into
> :V_ID_KATEGORI, :V_KATEGORI, :V_ID_LEVERANDOR,
> :V_LEVERANDOR, :V_URL,:V_KALKURL;
> suspend;
-> DO <something in the loop>
> ENDWith regards,
>
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com