I believe I need to use the LIKE clause but i'm not sure how.
Thanks
BenSelect * From Table Where Field Like '%' + sSearch.Replace("'","''") + '%'|||Hi Ben,
You're right, you can use the LIKE clause,
E.g.
SELECT * FROM Students WHERE StudentName LIKE '%NEW%'
Then the matched records include: HAPPY NEW YEAR and ASP.NEW :)
Regards,|||Hi Colt, thanks for that
If I wanted to apply the search to more than one fields could I use
SELECT * From Students WHERE StudentName, Field2, Field3, Field4 LIKE '%NEW%'
Is that the correct syntax?
Ben|||Hi,
You may try:
SELECT *
From Students
WHERE StudentName LIKE '%NEW%' OR
Field2 LIKE '%NEW%' OR
Field3 LIKE '%NEW%' OR
Field4 LIKE '%NEW%'
Regards,
No comments:
Post a Comment