Co10kl: Unterschied zwischen den Versionen

Aus informatikvs
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „<code> select a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, a.ocuskl , b.objekb, b.irlvkb , c.lfzv1b, c.lfzb1b , date(c.lfzv1b+693594) von, date(c.lfz…“)
 
 
Zeile 1: Zeile 1:
<code>
+
<pre>
select a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, a.ocuskl
+
with myvmi(hrknkl, hrkfkl, qpmgkl, adrekl, ocuskl
    , b.objekb, b.irlvkb
+
    , objekb, irlvkb
    , c.lfzv1b, c.lfzb1b
+
    , lfzv1b, lfzb1b
    , date(c.lfzv1b+693594) von, date(c.lfzb1b+693594) bis
+
    , von, bis)
from            ccmpdta0.sc1pf0kl a
+
as (
left outer join ccmpdta0.sc1pf0kb b  
+
    select a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, a.ocuskl
    on (b.hrknkb, b.hrkfkb, b.qpmgkb, b.adrekb, b.ittykb)
+
        , b.objekb, b.irlvkb
      =(a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, 'T')
+
        , c.lfzv1b, c.lfzb1b
left outer join ccmpdta0.sc1pf1kb c  
+
        , date(c.lfzv1b+693594) von, date(c.lfzb1b+693594) bis
    on (c.hrkn1b, c.hrkf1b, c.qpmg1b, c.adre1b, c.obje1b)
+
    from            ccmpdta0.sc1pf0kl a
      =(a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, b.objekb)
+
    left outer join ccmpdta0.sc1pf0kb b  
 +
        on (b.hrknkb, b.hrkfkb, b.qpmgkb, b.adrekb, b.ittykb)
 +
          =(a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, 'T')
 +
    left outer join ccmpdta0.sc1pf1kb c  
 +
        on (c.hrkn1b, c.hrkf1b, c.qpmg1b, c.adre1b, c.obje1b)
 +
          =(a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, b.objekb)
 +
)
 +
select * from myvmi
 
;
 
;
</code>
+
</pre>

Aktuelle Version vom 14. Juli 2017, 12:41 Uhr

with myvmi(hrknkl, hrkfkl, qpmgkl, adrekl, ocuskl
    , objekb, irlvkb
    , lfzv1b, lfzb1b
    , von, bis)
as (
    select a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, a.ocuskl
         , b.objekb, b.irlvkb
         , c.lfzv1b, c.lfzb1b
         , date(c.lfzv1b+693594) von, date(c.lfzb1b+693594) bis
    from            ccmpdta0.sc1pf0kl a
    left outer join ccmpdta0.sc1pf0kb b 
         on (b.hrknkb, b.hrkfkb, b.qpmgkb, b.adrekb, b.ittykb)
           =(a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, 'T')
    left outer join ccmpdta0.sc1pf1kb c 
         on (c.hrkn1b, c.hrkf1b, c.qpmg1b, c.adre1b, c.obje1b)
           =(a.hrknkl, a.hrkfkl, a.qpmgkl, a.adrekl, b.objekb)
)
select * from myvmi
;