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 -> Oracle trim in a where clause

Oracle trim in a where clause

From: Lionel <SPAMcoollATfreePOINTfr>
Date: Mon, 2 Oct 2006 10:37:32 +0200
Message-ID: <4520cfcc$0$437$636a55ce@news.free.fr>


Hi !

I have a performace problem on a SQL statement. I have to join a table column of type CHAR(100) over a dblink (the table comes from an external provider and can't be modified) My identifier value comes from a sequence. The dblink's table column identifier is formatted as (SomeChars || myId) + the spaces of the CHAR.

It seems that using:
select myColumn from myTable a, DbLinkTable b where 'SomeChars'||a.myId = trim(b.id)
performs quite bad.

I tried to append 88 spaces after my ID to avoid the trim: it is fast, but quite ugly (I'll have to remember to remove one whitespace when my sequence's length increases).

Anyone sees a solution ?
Thanks

PS: The only solution I see would be to add a CHAR(100) column to my table, which would contain (SomeChars || myId). I would like to avoid that... Received on Mon Oct 02 2006 - 03:37:32 CDT

Original text of this message

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