If you get an error message and you don't understand it, then google it:
SP2-0027: Input is too long (> 2499 characters) - Google Search[
^]
It explains that the error is simple: one or more lines of text in the query you are passing exceeds the maximum limit for a single line in sqlplus, and that to fix it you need to break the query up into multiple lines, all of which are shorter than 2500 characters.