Having said that, a SELECT with only a LIKE in the WHERE clause and with % at the start and end of the operand to LIKE is going to be slow as hell. To refer back to the original question:
Quote:
|
is it possible to create an sql script that will search for a particular string in a database table (in ms access) and wil return the whole row of the string that is being searched?
|
Basically, the answer is Yes. That's the bread and butter of SQL.
Your query will start:
which means 'give me the values of all the columns for each row of the result'. Next up you want:
(but replace tableName with the name of the table). Now you want to say something about which rows. Say you wanted to search a table called Customers for a row where Surname was Smythe:
SELECT *
FROM Customers
WHERE Surname = 'Smythe'
Well I hope this is helpful.