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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Problem with joining char field to varchar2 field

RE: Problem with joining char field to varchar2 field

From: John P Weatherman <asahoshi_at_infionline.net>
Date: Mon, 10 May 2004 13:55:02 -0400
Message-ID: <410-22004511017552448@infionline.net>


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_at_vicr.com>
> 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_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon May 10 2004 - 13:00:42 CDT

Original text of this message

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