SET SERVEROUTPUT ON
DECLARE
  v_name       donor.name%TYPE;
  v_state      donor.state%TYPE;
  v_contact    donor.contact%TYPE;
  v_yrgoal     donor.yrgoal%TYPE;
CURSOR donorcursor is
  SELECT name, state, yrgoal,contact into v_name, v_state, v_yrgoal, v_contact  FROM donor
    WHERE contact IN
      (SELECT contact
         FROM donor
         WHERE state = 'RI')
   OR
      contact IN
      (SELECT contact
         FROM donor
         WHERE yrgoal > 100);
  
BEGIN
    OPEN donorcursor;
    FETCH donorcursor into v_name, v_state, v_yrgoal, v_contact;
    WHILE donorcursor%FOUND loop
        dbms_output.put_line(v_name || ' ' || v_state || ' ' || v_yrgoal || ' ' || v_contact);
        FETCH donorcursor into v_name, v_state, v_yrgoal, v_contact;
    END loop;
    CLOSE donorcursor;
END;
/
SET SERVEROUTPUT OFF