Hi,
I have table that has about twenty fields that I would like to search. Rather than executing a query that says:
SELECT FROM MyTable WHERE FieldA LIKE '%searchtext%' OR FieldB LIKE '%searchtext%' OR FieldC LIKE '%searchtext%' OR FieldD LIKE '%searchtext%' OR FieldE LIKE '%searchtext%' OR FieldB LIKE '%searchtext%' etc..etc...etc..
I was wondering if there is a query that says select everything in row from table where anything in row is like '%searchstring%'. Searching 20 fields with just one search term will be bad enough but if the user enters two, three or even four words into the search box the query will become massive.
Thanks very much
Ed
I have table that has about twenty fields that I would like to search. Rather than executing a query that says:
SELECT FROM MyTable WHERE FieldA LIKE '%searchtext%' OR FieldB LIKE '%searchtext%' OR FieldC LIKE '%searchtext%' OR FieldD LIKE '%searchtext%' OR FieldE LIKE '%searchtext%' OR FieldB LIKE '%searchtext%' etc..etc...etc..
I was wondering if there is a query that says select everything in row from table where anything in row is like '%searchstring%'. Searching 20 fields with just one search term will be bad enough but if the user enters two, three or even four words into the search box the query will become massive.
Thanks very much
Ed