Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Alternate to Contains with fulltext index disabled in SQL Server 2005

Posted on 2006-07-07
2
Medium Priority
?
324 Views
Last Modified: 2006-11-18
Hi All,
I had a small problem with my search Query, i need to do contains search,

when i use like with % its searching the values which are having the given string or more

Ex: If i gave id like '%12345%' , its returning rows which are having 123435+ some extra only , but its not returning the records which are having 123 or so on.
but i need those records also.

I found that we can use CONTAINS but for that FULLTEXT INDEX Should be enabled, but our clent is not ready to enable this due to performance and some other aspects.

So can anybody help out in this search.

Thanks in Advance.

Regards,
Raju P S
0
Comment
Question by:rajups
  • 2
2 Comments
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 17057621
try pattern likes combination
ex:

LIKE '1[0-9][0-9][%]'
0
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 375 total points
ID: 17057626
usage example:

LIKE '123[%]'

Hope this helps...
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question