PL/SQL (MOSC)

MOSC Banner

19c Database and getting ORA-01422: exact fetch returns more than requested number of rows

in PL/SQL (MOSC) 6 commentsAnswered

DECLARE

 v_blob BLOB;

 v_len NUMBER;

 v_file_name VARCHAR2(100);

 v_output utl_file.file_type;

 v_totalsize NUMBER;

 v_position NUMBER := 1;

 v_chucklen NUMBER := 4096;

 v_chuck RAW(4096);

 v_remain NUMBER;

 v_atfilecontentno char(18);


cursor c_files is

   SELECT dbms_lob.Getlength (atc.filecontent), atc.atfilecontentno, atc.atfilecontentno || '.' || ext.extension || '.gzip'

   from atfilecontent atc, atfileproperties afp, atmimetype mt, FILEEXTTOMIMEMAPPING ext

   where atc.atfilecontentno = afp.atfilecontentno

   and afp.atmimetypeno = mt.atmimetypeno

   and mt.code = ext.mimetype

   and atc.atfilecontentno > 0;


BEGIN

   OPEN c_files;

   LOOP

       FETCH c_files INTO v_totalsize, v_atfilecontentno, v_file_name;

       EXIT WHEN c_files%NOTFOUND;

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center