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 10:38:47 -0700, "Jesse" <jesjdavis_at_gmail.com> wrote:
>Sorry, the SQL statement was simply the same core statement, only no
>variable:
>
>UPDATE zkora.ttr_utstandardsrun
> SET dimdatauploaded = 1
> WHERE utstandardfilename_text = 'A0000J6W'
I was afraid to see a statement with a hard-coded literal, and here it
is. Could you do the following
variable param varchar2(8)
begin
:param := 'A0000J6W';
UPDATE zkora.ttr_utstandardsrun
SET dimdatauploaded = 1
WHERE utstandardfilename_text =:param;
end;
/
and verify it fails?
You are comparing apples and pears really. Hard-coded literals are
automatically padded with spaces, when necessary, in any programming
language.
-- Sybrand Bakker, Senior Oracle DBAReceived on Thu May 05 2005 - 13:07:00 CDT