select ty.RWNAME as TYPID, ty.RWVALUE as TYPNAME, ty.RWDESC as TYPBESCHREIBUNG, ta.RWNAME as ATTRIBUTNAME, ta.RWVALUE as ATTRIBUTWERT, ta.RWDESC as ATTRIBUTBESCHREIBUNG 
  from CCRW ty 
    left outer join CCRW ta on ta.RWTYP='TYPEATTRIB' and ta.RWPARENT=ty.RWNAME
 where ty.RWTYP='TYPE' and ty.RWPARENT='TYPES'
order by TYPID,TYPNAME,TYPBESCHREIBUNG,ATTRIBUTNAME asc