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: What's this...varchar2 as fast as char?

Re: What's this...varchar2 as fast as char?

From: Gert Rijs <gem_at_wirehub.nl>
Date: 1997/02/08
Message-ID: <01bc159a$698b1240$5e5fa5c2@gertrijs>#1/1

Alvin,
Perhaps you can 'fool' your c-programs by letting them select from views: create view varchar_view as
select rtrim(col) as colname
from original_table;

hope this helps,

        Gert

At Home: gem_at_wirehub.nl
At Work: gert.rijs_at_corp.ah.nl

Alvin Sylvain <alvin_at_c-square.no.junk> wrote in article <32FC17A1.B9E_at_c-square.no.junk>...
> Well, speaking of varchar2 vs. char and rtrim:
>
> Does there happen to be any easy way to perform joins against
> two tables on a column which is char on one table, but varchar2
> on the other?
>
> I know about the "rtrim" on the char column. But we have a few
> thousand lines of C code to convert from Sybase to Oracle. We've
> already found it necessary to break the code a LOT more than we
> originally thought. Any more breakage, and we'll be faced with
> the decision of whether it would be easier to rewrite it from
> scratch (not enough time or personnel!)
>
> I also know about altering the table with the char to make it
> varchar, but we have about 300 tables with a big mixture of
> chars, varchars, and sizes. (This system wasn't designed by
> database experts: it just sort of =evolved=. Hence, you get
> things like Pandas using a wristbone as an opposable "thumb".)
>
> Further, we have a partner on this project who is reluctant to
> make that many changes to the schema. If it were just us, I'd
> put together a script and blast the whole shooting match in one
> day! Once you get the Oracle internal schemas figured out, it's
> not that hard to do.
>
> What I was hoping was that there might be some configuration
> set-up that would make rtrim and/or schema changes unnecessary.
>
> I know I can do an "alter session set nls_date_format = 'YYYY/MM/DD'"
> which at least changes the default date format to what we've been
> using. I'm hoping there might be something similar for the varchar
> problem.
>
> BTW, we're using Oracle 7.3.
>
> Any ideas would be appreciated! Thanks!
>

<SNIP> Received on Sat Feb 08 1997 - 00:00:00 CST

Original text of this message

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