Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL 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 December 6th, 2004, 10:24 PM
tim snl's Avatar
tim snl tim snl is offline
Code Cruncher
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Tasmania, Australia
Posts: 119 tim snl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 21 m 20 sec
Reputation Power: 8
Case insensitive LIKE for BLOB field??

Thankyou for considering my question.

I have a table that includes some memo text stored in a BLOB field. I need to select rows from this table where the TEXT BLOB FIELD contains a keyword the user has entered, this works fine using the code
Code:
... WHERE MYMEMODATA LIKE '%keyword%'
I have found that I can't use the UPPER() command on a BLOB field.
How can I make this where clause case insensitive?
__________________
Beware of a programmer with a screwdriver!

Reply With Quote
  #2  
Old December 7th, 2004, 03:25 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Quote:
Originally Posted by tim snl
Code:
... WHERE MYMEMODATA LIKE '%keyword%'


Maybe you could try this:
WHERE MYMEMODATA LIKE 'keyword' OR 'KEYWORD'

Reply With Quote
  #3  
Old December 7th, 2004, 08:08 AM
hugo2 hugo2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 20 hugo2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 14 sec
Reputation Power: 0
Quote:
Originally Posted by tim snl
I have a table that includes some memo text stored in a BLOB field. I need to select rows from this table where the TEXT BLOB FIELD contains a keyword the user has entered, this works fine using the code
Code:
... WHERE MYMEMODATA LIKE '%keyword%'
I have found that I can't use the UPPER() command on a BLOB field.
How can I make this where clause case insensitive?

This will work for basic ASCII characters:
Code:
... WHERE MYMEMODATA CONTAINING 'keyword'

If your blobs contain national characters, you would have to write UDF.

Reply With Quote
  #4  
Old December 7th, 2004, 08:12 AM
hugo2 hugo2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 20 hugo2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 14 sec
Reputation Power: 0
Quote:
Originally Posted by SilverDB
Maybe you could try this:
WHERE MYMEMODATA LIKE 'keyword' OR 'KEYWORD'

It is not complete , you would have to write:
WHERE mymemo LIKE '%keyword%' OR mymemo LIKE '%Keyword%' OR mymemo LIKE '%KEyword%' OR mymemo LIKE '%KEYword%' OR mymemo LIKE '%kEyword%' OR ...

Reply With Quote
  #5  
Old December 7th, 2004, 04:03 PM
tim snl's Avatar
tim snl tim snl is offline
Code Cruncher
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Tasmania, Australia
Posts: 119 tim snl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 21 m 20 sec
Reputation Power: 8
Quote:
Originally Posted by hugo2
This will work for basic ASCII characters:
Code:
... WHERE MYMEMODATA CONTAINING 'keyword'
Yes this does it well!!! The blobs don't contain national characters at this stage so it will do the job just fine. Thankyou.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Case insensitive LIKE for BLOB field??


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 5 hosted by Hostway
Stay green...Green IT