Garayed.com  

Go Back   Garayed.com > mySQL
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-09-2006, 05:23 PM
bobmct
 
Posts: n/a
Default advice on how to handle INSTR search?

Gentlemen;

I have a situation that should be quite minor but it seems I have struggling
with it for some reason or another. Here's what's up:

I have a column in a table defined as CHAR which contains sets of sequence
numbers (always two digits each) but all concatenated into a simple string
(i.e.: 001122334455etc). This string could be only a few sets or many
sets.

Also, the order of the sets within the string is NOT guaranteed to be in any
order (not ascending/descending).

My task is to take an supplied set of digits (of varying length itself) and
determine if the set(s) entered appear in ANY DB records.

I am planning on using the INSTR operatation. But I was planning on using
the entire supplied string to see if its contained in any of the DB's
referenced strings. For the most part this works. BUT..(always, right?),
the match seems to be absolute ONLY meaning that if the set appears but is
NOT stored in the same order/sequence of digits, it apparently doesn't
match.

So, short of operating on each substr individually, which I can imagine
would impair performance dramatically, is there an alternative to achieving
this with reasonable real-time performance?

Any ideas along with a written SELECT example would be GREATLY appreciated.

Thank you,

Always learning SQL'ite.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:41 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.