I have a search box where user enters anything in textbox and submits.Lets say user enters Peter.If we are comparing in sql table with following query
select * from xml where name like '%peter%'
This query works well,but when i want to search for only peter in the string,then it creates a problem.Like when i want to search for only those rows which are having Peter present in the name column. in name column,value 1-My name is Peter. valu2-My name is Peterwatter. valu3-My name is Peter living in US. when i want to search it should give only first and third row.not the second one.BUt with above query i m getting all the three rows.How can i correct that.Please guide on this