I need to write a Select query in bind-variable and this query has more than 2500 symbols.

Variable sql_txt clob;

Exec :sql_txt := 'Select .....';

But SQL Plus support only <2499 symbols. How to fix it?

  • Maybe write all in a text file and execute this file with sqlplus – Wernfried Domscheit Jan 29 '20 at 16:28

That limitation is for a single line.

You can break your statement into multiple lines to overcome that limitation, such as:

  :sql_txt := 'select ... ' ||
  ' ... ' ||
  ' ... ';
  • I wrote the same as you. Now I want to print it in SQL Plus, but the text doesn't show, only small part of it. – Proglib Jan 29 '20 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.