Schönen guten Morgen,

vielleicht kann mir wer einen heißen Tip geben:
Ich würde gerne folgende beiden Select in einer Ausgabe haben.
Code:
select distinct-- e.rvk as Verkauf_Nr,
case
when a.rvk='04' then 'hkast'
when a.rvk='07' then 'ghirt'
when a.rvk='11' then 'wrapp'
when a.rvk='12' then 'mkais'
when a.rvk='13' then 'bkohl'
when a.rvk='14' then 'drich'
when a.rvk='15' then 'gklai'
when a.rvk='16' then 'nmoit'
when a.rvk='17' then 'igraf'
when a.rvk='20' then 'bkais'
when a.rvk='21' then 'mseid'
when a.rvk='22' then 'jland'
when a.rvk='23' then 'gried'
when a.rvk='28' then 'sgers'
when a.rvk='29' then 'kboeg'
when a.rvk='30' then 'rbaie'
when a.rvk='31' then 'tpend'
when a.rvk='51' then 'jjaec'
when a.rvk='73' then 'aschm'
when a.rvk='84' then 'dbern'
when a.rvk='85' then 'bprel'
when a.rvk='86' then 'cshol'
when a.rvk='91' then 'glins'
when a.rvk='92' then 'arott'
when a.rvk='93' then 'krmoi'
when a.rvk='94' then 'agraf'
when a.rvk='95' then 'dpaku'
when a.rvk='98' then 'sduel'
when a.rvk='A01' then 'azu01'
when a.rvk='A02' then 'azu02'
when a.rvk='A03' then 'azu03'
when a.rvk='A04' then 'azu04'
when a.rvk='BEC' then 'abeck'
end as Benutzer, a.rvk, count(a.RBELAR) as Angebote, count(c.ivor) as Vorgaenge_im_ABI, substr(a.RBENBS, 3, 5) as Benu
from kd.AVRE a
left join jsrstati.sbname b on a.rvk = b.sbnr
left join kd.AVIFS c on substr(a.RBENBS, 3, 5)=c.benutz
where concat(rakdnr, ravor) not in (Select concat(rakdnr, ravor) from kd.avre where RBELAR='AN'and rgrint='S') 
and a.RBELAR='AN' and a.RFOLBA='' and(a.RBELDT like '16%' or a.RBELDT like '15%') and a.RGRINT =''
group by a.rvk, b.sbname, c.benutz
;
select c.benutz as Benutzer, count(c.ivor) as Vorgaenge_im_ABI --Vorgänge mit ABI
from kd.AVIFS c
where c.iudn IN ('bemerkung.txt','kommentar.txt')
and c.IDATUM > '2015-01-01'
group by c.benutz
;
Das Problem ist dass es so direkt keinVergleichsfeld in den Tabellen gibt, sonst wäre es easy.
vielen herzlichen Dank schon im voraus...