Q
Problem solve Get help with specific problems with your technologies, process and projects.

"Input is too long" error

Whenever I try to run a certain query in the SQL prompt, it gives the following error: "SP2-0027: Input is too long - line ignored." Please suggest how I can change the default character length so that I am able to run the query.

Whenever I try to run a certain query in the SQL prompt, it gives the following error: "SP2-0027: Input is too long (> 2499 characters) - line ignored." Please suggest how I can change the default character length so that I am able to run the query.

I do not know of any way to increase the SQL*Plus limit on the lenght of an input line. However, you can break the line up into multiple pieces. For instance, I might have a query that looks like the following:

 SELECT empno,ename,deptno,deptname,sal,mgr FROM emp WHERE deptno=10 OR mgr=1001; 

I can break this up into multiple lines similar to the following:

 SELECT empno,ename,deptno,deptname,sal,mgr FROM emp WHERE deptno=10 OR mgr=1001; 

SQL*Plus can handle multiple lines just fine. SQL*Plus knows which line is last if the line ends in a semi-colon or if the line only contains a forward slash. Consider breaking up your long SQL statement into multiple lines to avoid the SP2-0027 error.

Dig Deeper on Oracle and SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close