Subject | Re: [firebird-support] Substraction of 2 selections |
---|---|
Author | rpoulin |
Post date | 2004-04-30T17:25:58Z |
There is a parsing error i can't resolve in this procedure
(from code by Milan). Anyone has a solution ?
CREATE PROCEDURE DELTA_PRIX
/*DELTAPRIX2 numeric(10,2)*/
returns(
DELTAPRIX2 numeric(10,2)
)
AS
BEGIN
select d1.PRIX_MARGE_DETAIL - d2.PRIX_MARGE_DETAIL
from DETAIL_KIT d1
left join DETAIL_KIT d2 on d1.no_ordre = d2.no_ordre
where d2.PRINCIPAL ='N'
and d1.PRINCIPAL ='O'
order by d1.NO_ORDRE;
SUSPEND;
END^
(from code by Milan). Anyone has a solution ?
CREATE PROCEDURE DELTA_PRIX
/*DELTAPRIX2 numeric(10,2)*/
returns(
DELTAPRIX2 numeric(10,2)
)
AS
BEGIN
select d1.PRIX_MARGE_DETAIL - d2.PRIX_MARGE_DETAIL
from DETAIL_KIT d1
left join DETAIL_KIT d2 on d1.no_ordre = d2.no_ordre
where d2.PRINCIPAL ='N'
and d1.PRINCIPAL ='O'
order by d1.NO_ORDRE;
SUSPEND;
END^