1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| select lpad(co.numeproj,5,0)||'-'||lpad(co.numeoper,2,0)||' '||libeoper||decode(datedest,null,'',' destoké le '||datedest) libeoper,cpt.codtyppr,cpt.libtyppr,cda.numedoss,cda.codeprod,prixcess,cda.dateaffe
from com_operation co,
operation o,
com_type_produit cpt,
com_dossier_attribution cda
where cda.numeprod is not null
and cda.etatdoss in ('EC','CL')
and co.CODEOPER = cda.codeoper
and cda.codtyppr = cpt.codtyppr
and co.numeproj = o.numeproj
and co.numeoper = o.numeoper
and o.codeoper != 98
and not exists (select 1
from com_detail_av dt,
com_autorisation_versement av,
com_versement v
where dt.numedoss = cda.numedoss
and dt.nume__av = av.nume__av
and av.nume__av = v.nume__av)
and not exists (select 1
from com_versement_anterieur
where numedoss = cda.numedoss)
order by datedest |
Partager