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: function index concepts - urgh

RE: function index concepts - urgh

From: Diana Duncan <dduncan_at_arsenaldigital.com>
Date: Mon, 12 Mar 2001 08:14:23 -0800
Message-ID: <F001.002C9A1D.20010312075527@fatcity.com>

In no way would I ever disagree with Jared ;-), but wouldn't it be better to create two indices rather than the one?

create index HOLDER_LASTNAME_IDX on HOLDER (UPPER(LAST_NAME)); create index HOLDER_FIRSTNAME_IDX on HOLDER (UPPER(FIRST_NAME));

The select statement Jared wrote would definitely work, and you'd also have the ability to select only on first names, which having the concatenated last||first wouldn't give you.

My $0.02,

Diana

-----Original Message-----
Sent: Saturday, March 10, 2001 2:25 PM
To: Multiple recipients of list ORACLE-L

Dennis,

This should do it.

select * from holder
where last_name = upper('Taylor')
and first_name = upper('Dennis');

And no it's not Friday, it is now Saturday. ;)

Jared

On Fri, 9 Mar 2001, Dennis Taylor wrote:

> create index HOLDER_NAME_IDX on HOLDER (UPPER(LAST_NAME||'
'||FIRST_NAME));
>
>
> insert into holder (last_name,first_name) values ('taylor','dennis');
>
>
> select * from holder where last_name = 'Taylor' and first_name =
> 'Dennis';
>
>
> is that going to use the index? Or do I have to torque the select
> statement a little more? Or is there a better way to set up the index? Or
> is the problem just that it's friday? or maybe Friday?

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: jkstill_at_cybcon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Diana Duncan
  INET: dduncan_at_arsenaldigital.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Mar 12 2001 - 10:14:23 CST

Original text of this message

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