Getting an error ORA-00933 while using EXECUTE IMMEDIATE
At the end of the string, you're concatenating a final closing semi-colon; however, you don't have a closing quote after it.

Instead of:

AND RowNum &lt; '||v_LastRec||'; 


Try this:

AND RowNum &lt; '||v_LastRec||';'