Subject | Re: [firebird-support] Subselect in SP |
---|---|
Author | Helen Borrie |
Post date | 2007-04-23T23:28:01Z |
At 05:34 AM 24/04/2007, SET wrote:
create procedure blah ....
...
as
declare variable min_fecha numeric(18,2);
....
begin
select ....
into :min_fecha;
...
end
./heLen
>Simple Jorge,...in a SP, of course, that won't work either.
>
>select min(FACTURAS.FECHA)
>FROM ITEMS_FACTURAS
>JOIN FACTURAS ON ITEMS_FACTURAS.ID_FACTURA = FACTURAS.ID_FACTURA
> AND ITEMS_FACTURAS.SUCURSAL = FACTURAS.SUCURSAL
>WHERE FACTURAS.SUCURSAL=1 AND ITEMS_FACTURAS.CODIGO_PRODUCTO=31344
>
>No need to do simple things the complex way!
>Set
create procedure blah ....
...
as
declare variable min_fecha numeric(18,2);
....
begin
select ....
into :min_fecha;
...
end
./heLen