Subject Stored Procedures
Author Yves Cravic
In the part of a Stored Procedures below if I add Order By
domaine,libelle next to the Group By I have an error when I want to
compile the procedure (with IB Expert)
Where is my mistake?


For
with provis1 as (
SELECT ass.id_matieres as matier,mat.id_domaine as
domaine,mat.libelle,ass.heures_prevues as h_prev
From ASSEMBLER ass , matieres mat
Where ass.id_matieres = mat.id_matieres
And ass.id_formation = :d_id_formation
Union ALL
SELECT com.id_matieres as matier,mat.id_domaine as
domaine,mat.libelle,com.heures_prevues as h_prev
From COMPLETE com, matieres mat
Where com.id_matieres = mat.id_matieres
and com.id_formation = :d_id_formation)

select domaine,matier,libelle,Sum(h_prev)
from provis1
group by domaine,matier,libelle
into :Domaine_preced,:O_ID_MATIERE,:O_LIBELLE_MATIERE,:O_DUREE
DO

Yves Cravic
Antenna




[Non-text portions of this message have been removed]