Idea Summary
I am creating a classic report where the underlying table contains around 200 columns. Additionally, I am applying a custom filter with more than 4000 characters. To handle this, I used VARCHAR2(32767) for the SQL query variable in a PL/SQL function. The function compiles and saves correctly, but during page rendering, I encounter the error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
My SQL query includes column names as aliases, and when printed, it is approximately 11,500 characters long. Ideally, this should work, but I suspect there might be a hidden limit on the number of columns or characters affecting the UI.
Use Case
For large tables, it is essential to support SQL queries up to 32,767 characters, ensuring that extensive reports with multiple columns and complex filters can run without issues.
Preferred Solution (Optional)
Increase the supported SQL query length to 32,767 characters for proper execution and display in reports.