title: Oracle cursor running through the last item twice
body: <p>I have a a cursor loop that's building a string by concatenating the contents of a table together, using code along these lines:</p>
  
  <pre><code>OPEN cur_t;
  LOOP
      FETCH cur_t INTO v_texttoadd;
  
      v_string := v_string || v_texttoadd;
  EXIT WHEN cur_t%notfound;
  END LOOP;
  </code></pre>
  
  <p>The problem is, of course, that the last item gets added twice because the system runs through it once more before realising that there's nothing more to find.</p>
  
  <p>I tried playing around with something like </p>
  
  <pre><code>OPEN cur_t;
  WHILE cur_t%found;
  LOOP
      FETCH cur_t INTO v_texttoadd;
  
      v_string := v_string || v_texttoadd;
  END LOOP;
  </code></pre>
  
  <p>But that didn't seem to return anything at all.</p>
  
  <p>What kind of syntax should I be using so that each row only appears in the resulting string once?</p>