Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Update/Select on CHAR Column Behaves Differently In Stored Procedure
On 5 May 2005 07:39:27 -0700, "Jesse" <jesjdavis_at_gmail.com> wrote:
>My guess is that the problem lies in the fact that the stubeid variable
>is defined as a VARCHAR2. Am I right on this?
Yes, I think so. Oracle has variable length comparisons (for varchar2 columns) and fixed length comparisons (for char columns) Obviously it chooses fixed length comparisons. I'm not sure why Sql*plus would work, as you don't provide the SQL statement, this is difficult to determine. Probably you have some kind of implicit conversion.
-- Sybrand Bakker, Senior Oracle DBAReceived on Thu May 05 2005 - 12:03:00 CDT