RE: Problem with joining char field to varchar2 field

  • From: "John P Weatherman" <asahoshi@xxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Mon, 10 May 2004 13:55:02 -0400

Hi all,

I am having an issue that seems closely related to this.  A lot of code
values in our custom App are defined in char fields.  When we use our App
to locate values based on them, we can't find them.  The problem only
happens when using tools like PowerBuilder, toad, etc, AND using bind
variables.  This is on 9.2.0.4, Solaris9.  If I rpad the bind variables,
everything works fine, which is an improvement over the rtrim of all the
fields involved and then asking for function based indexes (which is what
the duhvelopers keep asking for).

Based on what I can see, it appears that the bind variables are treated as
varchar and compared to the char fields with the results indicated below. 
However setting blank_trimming, in this case, did nothing to help. 
Blank_trimming does default to false on my system, I have testing after
setting it to true.  Is there something I am missing here?  Any pointers
would be appreciated.

TIA,
John P Weatherman
Oracle DBA
Advance America


> [Original Message]
> From: Goulet, Dick <DGoulet@xxxxxxxx>
> Subject: RE: Problem with joining char field to varchar2 field 
>
>       There is a structural difference between a varchar and char datatypes.
> Char's will get padded to the full size of the field whereas Varchar's 
> won't.  To explain the differences in Windoze vs.  AIX check the init
> file to see if BLANK_TRIMMING is true.  Something in the past tells me =
> that the default on Windoze is true and Unix is false.


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: