Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Update/Select on CHAR Column Behaves Differently In Stored Procedure

Re: Update/Select on CHAR Column Behaves Differently In Stored Procedure

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 05 May 2005 20:07:00 +0200
Message-ID: <lunk71d8koo3i4f24kk3nfnnv0i1r8qiil@4ax.com>


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 DBA
Received on Thu May 05 2005 - 13:07:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US