Ich häng mich mal hier rein, es funzt nicht ...

PHP-Code:
update TEMP#B/FILE XX                                       
   
set (BEZWERT) =                                    
       (
select coalesce(substr(a.INHACD0130), '*fehlt'),    
               
coalesce(substr(b.INHACD2422), '*fehlt')     
 
from  CBUCHP a left outer join CBUCHP b                    
                  on  a
.FINR=b.FINR and a.SART=b.SART   
                  
and a.SPRC=b.SPRC and a.SAKZ=b.SAKZ   
            
and substr(a.RKEY12)=substr(b.RKEY12)   
            and 
' 01 '              =substr(b.RKEY34)     
                  
where a.SART='ABCD ' and a.SAKZ='6'       
                    
and substr(a.RKEY12)=digits(XX.BANK)
                    and 
substr(a.RKEY3) = ' '
Wenn in CBUCH der Eintrag für eine Bank mit rkey 'bb ' fehlt (Banknr, rest Blank --> letzte substr)
bricht er ab mit "Nullwerte für Spalte oder Variable BEZ nicht zulässig".

Erwartet hätte ich '*fehlt' in dem Testsatz