1

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?

1
  • Maybe write all in a text file and execute this file with sqlplus Commented Jan 29, 2020 at 16:28

1 Answer 1

2

That limitation is for a single line.

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

begin
  :sql_txt := 'select ... ' ||
  ' ... ' ||
  ...
  ' ... ';
end;
/
1
  • 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. Commented Jan 29, 2020 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.