dbTalk Databases Forums  

help searching for oracles and Oracles and ORACLES

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss help searching for oracles and Oracles and ORACLES in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jharbour7@googlemail.com
 
Posts: n/a

Default help searching for oracles and Oracles and ORACLES - 02-18-2008 , 03:44 PM






Hello Mark D Powell, Robert Klemme, Michael O'Shea, David FitzJarrell
and thank you for your help before.


I have a table called "table2" that has the following in it


id1 Description
1 oracle oracle oracle oracle
2 oracle school oracle school school school
6 the school the party the oracle


How can I get SQL to get rows with Oracle or oracle (first letter is
upcase) or ORACLE

My SQL is

select * from table2 where description like '%oracle%' or description
like '%Oracle' or description like '%ORACLE%'


In access '%oracle%' works in upcase or lower case but in Oracle I
have to keep testing for all cases. The word might be oRaCLe but I
don't want to write them all.

How can I do this

Thank you

Jon

Reply With Quote
  #2  
Old   
JolsJowels
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-19-2008 , 12:31 AM






Hi Jon,

I would suggest the following:

select * from table2 where instr(lower(description),'oracle') >
0;

lower will make all the characters in the description field lowercase
so you only need to test for lower case characters.

instr will return > 0 if it finds any occurance of the word 'oracle'

Hope this helps,
C

Reply With Quote
  #3  
Old   
JolsJowels
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-19-2008 , 12:31 AM



Hi Jon,

I would suggest the following:

select * from table2 where instr(lower(description),'oracle') >
0;

lower will make all the characters in the description field lowercase
so you only need to test for lower case characters.

instr will return > 0 if it finds any occurance of the word 'oracle'

Hope this helps,
C

Reply With Quote
  #4  
Old   
JolsJowels
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-19-2008 , 12:31 AM



Hi Jon,

I would suggest the following:

select * from table2 where instr(lower(description),'oracle') >
0;

lower will make all the characters in the description field lowercase
so you only need to test for lower case characters.

instr will return > 0 if it finds any occurance of the word 'oracle'

Hope this helps,
C

Reply With Quote
  #5  
Old   
JolsJowels
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-19-2008 , 12:31 AM



Hi Jon,

I would suggest the following:

select * from table2 where instr(lower(description),'oracle') >
0;

lower will make all the characters in the description field lowercase
so you only need to test for lower case characters.

instr will return > 0 if it finds any occurance of the word 'oracle'

Hope this helps,
C

Reply With Quote
  #6  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-20-2008 , 02:46 PM



On Feb 18, 3:44*pm, jharbo... (AT) googlemail (DOT) com wrote:
Quote:
Hello Mark D Powell, Robert Klemme, Michael O'Shea, David FitzJarrell
and thank you for your help before.

I have a table called "table2" that has the following in it

id1 * * *Description
*1 * * * oracle oracle oracle oracle
*2 * * * oracle school oracle school school school
*6 * * * the school the party the oracle

How can I get SQL to get rows with Oracle or oracle (first letter is
upcase) or ORACLE

My SQL is

select * from table2 where description like '%oracle%' or description
like '%Oracle' or description like '%ORACLE%'

In access '%oracle%' works in upcase or lower case but in Oracle I
have to keep testing for all cases. The word might be oRaCLe but I
don't want to write them all.

How can I do this

Thank you

Jon
SQL> create table table2 (
2 id number,
3 description varchar2(50));

Table created.

SQL> insert all
2 into table2 values (1,'oracle oracle oracle oracle')
3 into table2 values (2,'oracle school oracle school school
school')
4 into table2 values (3, 'Oracle is the oracle for Oracle')
5 into table2 values (4, 'OrAcLe is less of an oRACLE than oRaClE
ever was')
6 into table2 values (5, 'well, gee, my duck needs new shoes')
7 into table2 values (6,'the school the party the oracle')
8 select * from dual
9 /

6 rows created.

SQL> commit;

Commit complete.

SQL> select *
2 from table2
3 where instr(upper(description), 'ORACLE') > 0
4 /

ID DESCRIPTION
---------- --------------------------------------------------
1 oracle oracle oracle oracle
2 oracle school oracle school school school
3 Oracle is the oracle for Oracle
4 OrAcLe is less of an oRACLE than oRaClE ever was
6 the school the party the oracle

SQL>


David Fitzjarrell


Reply With Quote
  #7  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-20-2008 , 02:46 PM



On Feb 18, 3:44*pm, jharbo... (AT) googlemail (DOT) com wrote:
Quote:
Hello Mark D Powell, Robert Klemme, Michael O'Shea, David FitzJarrell
and thank you for your help before.

I have a table called "table2" that has the following in it

id1 * * *Description
*1 * * * oracle oracle oracle oracle
*2 * * * oracle school oracle school school school
*6 * * * the school the party the oracle

How can I get SQL to get rows with Oracle or oracle (first letter is
upcase) or ORACLE

My SQL is

select * from table2 where description like '%oracle%' or description
like '%Oracle' or description like '%ORACLE%'

In access '%oracle%' works in upcase or lower case but in Oracle I
have to keep testing for all cases. The word might be oRaCLe but I
don't want to write them all.

How can I do this

Thank you

Jon
SQL> create table table2 (
2 id number,
3 description varchar2(50));

Table created.

SQL> insert all
2 into table2 values (1,'oracle oracle oracle oracle')
3 into table2 values (2,'oracle school oracle school school
school')
4 into table2 values (3, 'Oracle is the oracle for Oracle')
5 into table2 values (4, 'OrAcLe is less of an oRACLE than oRaClE
ever was')
6 into table2 values (5, 'well, gee, my duck needs new shoes')
7 into table2 values (6,'the school the party the oracle')
8 select * from dual
9 /

6 rows created.

SQL> commit;

Commit complete.

SQL> select *
2 from table2
3 where instr(upper(description), 'ORACLE') > 0
4 /

ID DESCRIPTION
---------- --------------------------------------------------
1 oracle oracle oracle oracle
2 oracle school oracle school school school
3 Oracle is the oracle for Oracle
4 OrAcLe is less of an oRACLE than oRaClE ever was
6 the school the party the oracle

SQL>


David Fitzjarrell


Reply With Quote
  #8  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-20-2008 , 02:46 PM



On Feb 18, 3:44*pm, jharbo... (AT) googlemail (DOT) com wrote:
Quote:
Hello Mark D Powell, Robert Klemme, Michael O'Shea, David FitzJarrell
and thank you for your help before.

I have a table called "table2" that has the following in it

id1 * * *Description
*1 * * * oracle oracle oracle oracle
*2 * * * oracle school oracle school school school
*6 * * * the school the party the oracle

How can I get SQL to get rows with Oracle or oracle (first letter is
upcase) or ORACLE

My SQL is

select * from table2 where description like '%oracle%' or description
like '%Oracle' or description like '%ORACLE%'

In access '%oracle%' works in upcase or lower case but in Oracle I
have to keep testing for all cases. The word might be oRaCLe but I
don't want to write them all.

How can I do this

Thank you

Jon
SQL> create table table2 (
2 id number,
3 description varchar2(50));

Table created.

SQL> insert all
2 into table2 values (1,'oracle oracle oracle oracle')
3 into table2 values (2,'oracle school oracle school school
school')
4 into table2 values (3, 'Oracle is the oracle for Oracle')
5 into table2 values (4, 'OrAcLe is less of an oRACLE than oRaClE
ever was')
6 into table2 values (5, 'well, gee, my duck needs new shoes')
7 into table2 values (6,'the school the party the oracle')
8 select * from dual
9 /

6 rows created.

SQL> commit;

Commit complete.

SQL> select *
2 from table2
3 where instr(upper(description), 'ORACLE') > 0
4 /

ID DESCRIPTION
---------- --------------------------------------------------
1 oracle oracle oracle oracle
2 oracle school oracle school school school
3 Oracle is the oracle for Oracle
4 OrAcLe is less of an oRACLE than oRaClE ever was
6 the school the party the oracle

SQL>


David Fitzjarrell


Reply With Quote
  #9  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: help searching for oracles and Oracles and ORACLES - 02-20-2008 , 02:46 PM



On Feb 18, 3:44*pm, jharbo... (AT) googlemail (DOT) com wrote:
Quote:
Hello Mark D Powell, Robert Klemme, Michael O'Shea, David FitzJarrell
and thank you for your help before.

I have a table called "table2" that has the following in it

id1 * * *Description
*1 * * * oracle oracle oracle oracle
*2 * * * oracle school oracle school school school
*6 * * * the school the party the oracle

How can I get SQL to get rows with Oracle or oracle (first letter is
upcase) or ORACLE

My SQL is

select * from table2 where description like '%oracle%' or description
like '%Oracle' or description like '%ORACLE%'

In access '%oracle%' works in upcase or lower case but in Oracle I
have to keep testing for all cases. The word might be oRaCLe but I
don't want to write them all.

How can I do this

Thank you

Jon
SQL> create table table2 (
2 id number,
3 description varchar2(50));

Table created.

SQL> insert all
2 into table2 values (1,'oracle oracle oracle oracle')
3 into table2 values (2,'oracle school oracle school school
school')
4 into table2 values (3, 'Oracle is the oracle for Oracle')
5 into table2 values (4, 'OrAcLe is less of an oRACLE than oRaClE
ever was')
6 into table2 values (5, 'well, gee, my duck needs new shoes')
7 into table2 values (6,'the school the party the oracle')
8 select * from dual
9 /

6 rows created.

SQL> commit;

Commit complete.

SQL> select *
2 from table2
3 where instr(upper(description), 'ORACLE') > 0
4 /

ID DESCRIPTION
---------- --------------------------------------------------
1 oracle oracle oracle oracle
2 oracle school oracle school school school
3 Oracle is the oracle for Oracle
4 OrAcLe is less of an oRACLE than oRaClE ever was
6 the school the party the oracle

SQL>


David Fitzjarrell


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.