Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 3rd, 2005, 03:16 PM
Bastion Bastion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 181 Bastion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 4 h 25 m 11 sec
Reputation Power: 5
Case sensitive issue

I'm not 100% sure if I should be asking this Forum or the ColdFusion forum. But since my code in question is an SQL statement accessing an Oracle Database, I figured here was the best place. If not, let me know.

I'm running a search using ColdFusion. One of the items a user can search for is a person's name or part of the person's name. However, if I search for "George" I will only get results that have a capital "G" and lower-case "eorge" That is, any results not matching the case exactly are ommitted.

My code is:
WHERE staff_name LIKE '%George%'

Is there something that I can do to tell it to pull up all results regardless of case?

Reply With Quote
  #2  
Old March 3rd, 2005, 03:35 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 20 m 49 sec
Reputation Power: 48
UPPER()
Code:
WHERE UPPER(staff_name) LIKE '%GEORGE%' 


There is also LOWER() if you'd like that better

Reply With Quote
  #3  
Old March 4th, 2005, 12:59 PM
Bastion Bastion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 181 Bastion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 4 h 25 m 11 sec
Reputation Power: 5
Quote:
Originally Posted by jim mcnamara
UPPER()
Code:
WHERE UPPER(staff_name) LIKE '%GEORGE%' 


There is also LOWER() if you'd like that better


That's perfect. Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Case sensitive issue


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT