Ask a Question related to Oracle Server, Design and Development.
-
Andrey Voronov #1
case-insensitive sort
How I can implement case-insensitive sort without use function-based index?
Andrey Voronov Guest
-
case insensitive REPLACE(...)?
Hi, I need to search and replace a web address, but the original address could be in any case. Is there a way of doing a case insensitive search... -
problems with case insensitive tr/// regexp
I'm trying to create a script to remove all font tags from an HTML documents. I created a regular expression like this: ,----[ working code |... -
#23026 [Com]: Make Zend case-sensitive (classes, functions, remove case-insensitive)
ID: 23026 Comment by: nvivo at mandic dot com dot br Reported By: mfischer@php.net Status: Open Bug Type: ... -
[PHP] case insensitive sort
Ok. Now I REALLY feel like an idiot. Thanks so much for your help. Steve At 05:46 PM 8/26/2003 +0200, you wrote: -
Case-insensitive str_replace
Hi, I'm trying to replace strings in a body of html. These strings may contain spaces. str_replace works perfectly, except that it is... -
andrewst #2
Re: case-insensitive sort
Originally posted by Andrey VoronovI guess your options are:> How I can implement case-insensitive sort without use function-based
> index?
1) ORDER BY UPPER(colname)
and have a full table scan
2) Create another column UPPER_COLNAME and a BEFORE INSERT/UPDATE
trigger that sets :NEW.upper_colname = :NEW.colname;
create an index on UPPER_COLNAME;
then ORDER BY upper_colname
--
Posted via [url]http://dbforums.com[/url]
andrewst Guest
-
Jim Kennedy #3
Re: case-insensitive sort
I don't think that necessitates a full table scan. It is an order by which
is performed AFTER the result is selected. Try it where you get 1 row back
and do the order by. I would be very surprised if it did a full table scan.
eg
select * from emp where emp_no=3 order by upper(last_name)
(assuming emp_no is the primary key and last_name is a column in the table)
Jim
--
Replace part of the email address: [email]kennedy-down_with_spammers@attbi.com[/email]
with family. Remove the negative part, keep the minus sign. You can figure
it out.
"andrewst" <member14183@dbforums.com> wrote in message
news:2381014.1042466888@dbforums.com...>
> Originally posted by Andrey Voronov> I guess your options are:> > How I can implement case-insensitive sort without use function-based
> > index?
>
> 1) ORDER BY UPPER(colname)
> and have a full table scan
>
> 2) Create another column UPPER_COLNAME and a BEFORE INSERT/UPDATE
> trigger that sets :NEW.upper_colname = :NEW.colname;
> create an index on UPPER_COLNAME;
> then ORDER BY upper_colname
>
> --
> Posted via [url]http://dbforums.com[/url]
Jim Kennedy Guest
-
David Fitzjarrell #4
Re: case-insensitive sort
Using SQL Server comes to mind ...
Your other option is to convert the values to either all upper-case or
all lower-case and sort (order) on the converted column:
select ..., ..., ...
from ...
where ...
order by upper(column_name)
This, of course, is not as fast as having the associated
function-based index in place, but it does work.
You could, as an application modification, store the case-insensitive
values in another column, index that, then perform your order by
operations. Of course, that requires change control and an outage,
something you may be willing to do.
David Fitzjarrell
"Andrey Voronov" <avoronov@diasoft.ru> wrote in message news:<avtmo8$23jf$1@gavrilo.mtu.ru>...> How I can implement case-insensitive sort without use function-based index?David Fitzjarrell Guest



Reply With Quote

