Q:

Oracle sql developer trigger error ORA-04088: error during execution of trigger 'SYSTEM.LRES_PROTOKOLL'

I create a trigger
create or replace TRIGGER trj2
  BEFORE  INSERT OR UPDATE OF
  customer_ID ON Reserve
FOR EACH ROW
DECLARE
  new_fk1_NR VARCHAR2(7);
BEGIN
  SELECT NR
      INTO new_fk1_NR
      FROM  customers
      WHERE   :NEW.customer_ID= customers.ID;  
      :NEW.NR_K := new_fk1_NR;
END;

It is working fine for update statements, but for insert it give this error 

ORA-01403: no data found ORA-06512: at "SYSTEM.WRITERESPROT", line 76
  ORA-06512: at "SYSTEM.LRES_PROTOKOLL", line 38 
  ORA-04088: error during execution of trigger 'SYSTEM.LRES_PROTOKOLL'

I couldn't find links or explanations about what does this mean,
any help please?

A:

The problem is when no rows are returned.  A simple way to ensure that exactly one row is returned is to use aggregation:
SELECT MAX(NR)
INTO new_fk1_NR
FROM customers
WHERE :NEW.customer_ID = customers.ID; 

An aggregation query with no GROUP BY returns exactly one row, even when no rows match.  If no rows match, the result is NULL.

