Search Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cryan
    New Member
    • Jan 2008
    • 8

    Search Query

    Hello,

    I have a database of 100million rows and need to do a like statement with "%test%". I understand that it does not use an index and it is really slow and resource intensive.

    Is there a way to use a Full Text search to get the middle of words? I know you can use word beginnings like '"test*"' but what about '"*test*"' and return the same results as a like "%test%"

    For example:
    I need to search "abas" and return results like "database".

    Any suggestions or am I stuck with the like statement?
  • iam_clint
    Recognized Expert Top Contributor
    • Jul 2006
    • 1207

    #2
    i don't see why '"*test*"' wouldn't return the same results as like "%test%"

    Code:
    select name from blah where contains(name, '"*test*"')

    Comment

    Working...