Toad World® Forums

ORA-01460: unimplemented or unreasonable conversion requested and CHAR args


#1

A user reported a problem in which their program, which seemed to execute just fine, would raise the

ORA-01460: unimplemented or unreasonable conversion requested

error when run within Code Tester.

I tracked down the problem to the CHAR (fixed length) argument of the program.

Code Tester generates a local variable like this to hold the input value:

l_arg_in CHAR(32767);

Inside the program, this argument is referenced inside a query:

SELECT * into l_rec FROM table WHERE col = l_arg_in;

and it looks like inside SQL (within PL/SQL), it cannot work with a CHAR value that is greater than 4000 in length. This same problem does NOT occur with VARCHAR2.

The solution/workaround:

1 Open the Test Editor for this program.
2 Navigate to the program being tested, then to the Test Elements section.
3 Click on the CHAR argument.
4 Change the “Datatype as Declare” field from CHAR(32767) to CHAR(4000).

Then the problem should go away.

SF


#2

Good to know how to work around this… on the other hand why would you want to use CHAR anyway?..
This also implies that it is not possible to test a CHAR of 4001 in length. Another reason not to use CHARs…
You’re bound to run into trouble with this datatype sooner or later.


#3

I would love to be able to design Code Tester so that we can include with it a set of guidelines that in essence say:

  • This or that is a bad idea.
  • So don’t do it.
  • And we won’t support it in Code Tester.

Sadly, I don’t have QUITE that authority in the world of PL/SQL development.

SF


#4

Sadly, I don’t have QUITE that authority in the world of PL/SQL development.

Are you sure about that?