I've got a PL/SQL VArray that I'm filling with a BULK COLLECT query like this:
SELECT id
BULK COLLECT INTO myarray
FROM aTable
Now I'd like to pass a slice of this collection into another collection, something like this:
newarray := myarray(2..5)
This should pass the elements 2,3,4 and 5 from myarray to newarray.
I could write a loop and copy the elements, but is there a more compact way to do this?