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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert date and time to a table

Re: Insert date and time to a table

From: Chris Hamilton <ToneCzar_at_erols.com>
Date: Wed, 16 Jun 1999 11:18:43 GMT
Message-ID: <376786fb.2313801@news.erols.com>


On 15 Jun 1999 18:31:21 PDT, Y2K <y2000_at_pacbell.net> wrote:

>Thanks for the reply!
>
>Another quick question: how do I set my Oracle database to be case
>insensitive?
>
>Right now if I do select * from mytable where username like 'a%', it'll
>return nothing as the initial letter is capital in the username table. I
>thought Oracle automatically uses case insentivitity. Where do I set this
>option?

You kind of need to choose all upper or all lower-case for your data. Oracle is not case-insensitive when it comes to data. The way you write a query can be case-insenstive, that is:

SELECT empname FROM Employee;

is the same as

select EMPNAME from EMPLOYEE;

But the data itself is case-sensitive, as well it should be.

If your data looks like this:

EMPNAME



smith
jones
johnson

You could query like this:

select empname from employee where empname like 'j%' or
select empname from employee where empname like lower(:variable) but don't do
select empname from employee where lower(empname) like :variable as this will disable the use of an index on that column for that query.

In Oracle 8i, I understand you can build function-based indexes, so you could therefore index the empname column to be lower(empname) and solve some of your woes!

Chris
You can



Christopher Hamilton
Oracle DBA -- Wall Street Sports
chris_at_wallstreetsports.com
http://www.wallstreetsports.com/ Received on Wed Jun 16 1999 - 06:18:43 CDT

Original text of this message

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