Solved

Alternate to Contains with fulltext index disabled in SQL Server 2005

Posted on 2006-07-07
2
274 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

758 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

21 Experts available now in Live!

Get 1:1 Help Now