Solved

Alternate to Contains with fulltext index disabled in SQL Server 2005

Posted on 2006-07-07
2
284 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 125 total points
ID: 17057626
usage example:

LIKE '123[%]'

Hope this helps...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now