j' ai crée une requete basée sur plusieur requetes et liées par instruction union
mais ne marche pas le compilateur comme ne reconnait pas l'instruction UNION
voila mon code :

alors que chaque requete marche toute seule.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
create or replace view v_opendailyresult as
  select (b.risk ||' '||b.libelle_a) as riskcenter,sum(a.mtm_pl) as cash,0 as future,0 as inventorie,0 as freit,0 as forex
    from dpl_posit a,risk b
    where a.risk=b.risk
    group by b.risk,b.libelle_a
    order by b.risk,b.libelle_a
 
UNION
 
  select (b.risk ||' '||b.libelle_a) as riskcenter,0 as cash,sum(c.mkt_price)as future,0 as inventorie,0 as freit,0 as forex
    from dpl_futures c,risk b
    where c.risk=b.risk
    group by b.risk,b.libelle_a
    order by b.risk,b.libelle_a  
 
union
 
   select (b.risk ||' '||b.libelle_a) as riskcenter,0 as cash,0 as future,sum(d.mkt_prime) as options,0 as inventorie,0 as freit,0 as forex
    from dpl_options d,risk b
    where d.risk=b.risk
    group by b.risk,b.libelle_a
    order by b.risk,b.libelle_a   
 
union
 
   select (b.risk ||' '||b.libelle_a) as riskcenter,0 as cash,0 as future,0 as options,sum(e.mkt_price)as inventorie,0 as freit,0 as forex
    from dpl_stock e,risk b
    where e.risk=b.risk
    group by b.risk,b.libelle_a
    order by b.risk,b.libelle_a      
 
union
 
   select (b.risk ||' '||b.libelle_a) as riskcenter,0 as cash,0 as future,0 as options,0 as inventorie,sum(f.mkt_price) as freit,0 as forex
    from dpl_fret f,risk b
    where f.risk=b.risk
    group by b.risk,b.libelle_a
    order by b.risk,b.libelle_a     
 
union
 
   select (b.risk ||' '||b.libelle_a) as riskcenter,0 as cash,0 as future,0 as options,0 as inventorie,0 as freit,sum(g.mkt_price)as forex
    from dpl_forex g,risk b
    where g.risk=b.risk
    group by b.risk,b.libelle_a
    order by b.risk,b.libelle_a ;

merci