I have a QUOTES table that has a LOT of fields
I have a search engine that compares the input keyword using LIKE to each field and returns any matches
Is this the fastest method? (I am using an SQL Server 2005 backend)
I am wondering if making a query that concatenates multiple fields and then performs one LIKE on that field might be faster?
Or is there another method?
Strangely I cant seem to find much online about it.
Here is what I currently use, with 421 being the keyword:
Any speed tips would be appreciated..
I have a search engine that compares the input keyword using LIKE to each field and returns any matches
Is this the fastest method? (I am using an SQL Server 2005 backend)
I am wondering if making a query that concatenates multiple fields and then performs one LIKE on that field might be faster?
Or is there another method?
Strangely I cant seem to find much online about it.
Here is what I currently use, with 421 being the keyword:
Any speed tips would be appreciated..
Code:
SELECT [Quote Num], [QuoteDBID] FROM Quotes WHERE
(([Customer] Like "*421*") OR ([Full Quote Num] Like "*421*") OR ([OE Number] Like "*421*") OR ([Reference] Like "*421*") OR ([Notes] Like "*421*") OR ([Customer Order Number] Like "*421*") OR ([P Number] Like "*421*") OR ([Cust Contact] Like "*421*") OR ([Parent Quote] Like "*421*") OR ([Cust Email] Like "*421*") OR ([Cust Postal Address] Like "*421*") OR ([Cust Street Address] Like "*421*") OR ([Sales Area (Quotes Table)] Like "*421*") OR ([Est Manu Notes] Like "*421*") OR ([Transport Del Point] Like "*421*") OR ([Scope Details] Like "*421*") OR ([SearchMemo] Like "*421*") OR ([Consignment Note Number] Like "*421*") OR ([Delivery Address] Like "*421*") OR ([Dispatch Carrier Name] Like "*421*") OR ([Delivery Address UNIBIS] Like "*421*") OR ([End User] Like "*421*"))
AND ([SiteCode] = "Bassendean")
ORDER BY [Quote Arrival Date] DESC;