Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle APEX SQL Command Select Query Returning Error

Jasper TanglibJul 15 2021

Hi,
In Oracle APEX 20.2, I have a table called TC_DATABASE. I wanted to see its data and so I did the usual select query, SELECT * FROM TC_DATABASE, but suddenly it displays the error, as shown below,
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I think this error has something to do with the data. Since these data are just my tests, I just truncated the table, tried to do the select query again on the now empty table but it still returned the same error. I can still insert data into the table though.
What caused this behavior and how to fix this?
User:

Any idea or suggestion is appreciated!
-Jazz

Comments

Angus123

Have you tried the sql in Toad or SQL Developer

Jasper Tanglib

Not yet, but that is the pending action I am going through setting up our SQL Developer.

Just an addition to the issue,
I get error from SELECT * FROM TC_DATABASE, but no error or successful data query from SELECT column1, column2, column3 FROM TC_DATABASE.

fac586

I get error from SELECT * FROM TC_DATABASE, but no error or successful data query from SELECT column1, column2, column3 FROM TC_DATABASE.
How many columns are there in the table? What is the potential maximum byte size of a returned row if all of the columns contain data?

Jasper Tanglib

TC_DATABASE has 751 columns. Not yet sure on the potential maximum byte size when all columns contain data

fac586

TC_DATABASE has 751 columns.
There is too much data. I don't the exact limits in SQL Commands, but there are limits to the size of the data it can output.

Jasper Tanglib

But even when the table is empty, no data at all, I still get the error when I run Select query.
Or did you mean too many columns

TexasApexDeveloper

751 columns in one table? You really should go back and re-model you database table.. That is beyond a mess.. Why exactly would you have that many columns in one table?
Thank you!

Tony Miller
White Rock, NM

Jasper Tanglib

It's my database manager who created 751 columns. I guess that is really the requirement since we are building a calculator with several fields and computations.

Sylvain Martel

Just don't query 751 columns, or use count(*)!
Anyways, I would love to see this table...

1 - 9

Post Details

Added on Jul 15 2021
9 comments
966 views