The requirement is to copy a clob object to another. Since the source clob object is large, I was initially getting a 'numeric or value error'. So I decided to perform the copy function inside a while loop, by breaking the amount copied to 2000 in one interation, which is as follows

```
temp := 0;
 WHILE temp < 10000 LOOP
     DBMS_LOB.COPY(DEST_DOC, SRC_DOC, 2000, length(DEST_DOC) + 1, temp + 1); 
     temp := temp + 2000;
END LOOP;

```

Using 10000 only for example purposes. Ideally it should have been the size of the SRC\_DOC. But this throws the same error. Although the statement without the loop which is well over 10000 (or any number for that matter)

```
DBMS_LOB.COPY(DEST_DOC, SRC_DOC, 2000, length(DEST_DOC) + 1, 10000 + 1)

```

doesn't throw any error and works just as intended. I am stuck on this for days. Would be greatly appreciable if someone could provide a solution. The total size of the SRC\_DOC is 7,80,876.