select JAHR as "Jahr", MONAT as "Monat", resm.ENV as "Umgebung", rt.RWDESC as "Ressourcen-Type", to_char(to_number(AMOUNT),'999999999999','NLS_NUMERIC_CHARACTERS='',.''') as "Menge" from CCVDCRESM resm left outer join CCRW rt on rt.RWTYP='DCRTYP' and rt.RWPARENT='DCR' and rt.RWNAME=resm.RESTYPE where jahr=:JAHR and ENV=:ENV and RESTYPE=:RESTYPE