|
Replies:
2
-
Pages:
1
-
Last Post:
Nov 9, 2009 5:43 AM
by: JohnnyWalkerRed
|
|
|
Posts:
2
Registered:
11/3/09
|
|
|
|
Full Text Index - Partial Match
Posted:
Nov 3, 2009 11:26 AM
|
|
|
I have setup a full text index and it is performing well. In this application, I need to look for a customer's order number anywhere in 3 varchar fields. I want to query all rows that have one of 3 fields that contain a string anywhere in it. I have seen several posts on the web that suggest it doesn't work, others that say an asterisks works for wildcard character. When compared to a LIKE on the same 3 fields, it doesn't return all the rows.
WHERE contains((pickup_release_nbr, delivery_po_nbr, billing_reference_nbr), '*43834*')
|
|
|
Posts:
22
Registered:
8/27/07
|
|
|
|
Re: Full Text Index - Partial Match
Posted:
Nov 6, 2009 6:59 PM
in response to: JohnnyWalkerRed
|
|
|
Nope, that won't work.
You'll need to do a multi-part WHERE clause:
WHERE (pickup_release_nbr LIKE '%43834%' OR delivery_po_nbr LIKE '%43834%' OR billing_reference_nbr LIKE '%43834%') <!--Session data-->
|
|
|
Posts:
2
Registered:
11/3/09
|
|
|
|
Re: Full Text Index - Partial Match
Posted:
Nov 9, 2009 5:43 AM
in response to: KevinK
|
|
|
I was afraid of that. I was trying to use full text index for speed, but will abandon it. Thanks.
|
|
|
|
Legend
|
|
Guru: 2001
+
pts
|
|
Expert: 751
- 2000
pts
|
|
Enthusiast: 31
- 750
pts
|
|
Novice: 0
- 30
pts
|
|
Moderators
|
|
Helpful answer
(5 pts)
|
|
Answered
(10 pts)
|
|