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?
Balazs Papp
41.5k2 gold badges29 silver badges47 bronze badges
-
Maybe write all in a text file and execute this file with sqlplusWernfried Domscheit– Wernfried Domscheit2020年01月29日 16:28:31 +00:00Commented Jan 29, 2020 at 16:28
1 Answer 1
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;
/
answered Jan 29, 2020 at 15:27
-
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– Proglib2020年01月29日 18:43:31 +00:00Commented Jan 29, 2020 at 18:43
lang-sql