Click here to Skip to main content
15,941,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

The column value in my database is 'University of Madras', But the user passes 'Madras University' in the Auto-complete box. what is the possible way that he could find 'University of Madras' when he passes 'Madras University'.

Thanks in advance
Lohieth
Posted

1 solution

Solution 1: Following piece of code will help you out (without Full Text Search)
Suppose, column value in my database is 'University of Madras' and name of column is 'University_Name' and tableName is StudentDetails
SQL
select * from StudentDetails where University_Name like '%Madras%' and University_Name like '%University%'


Solution 2 Following piece of code will help you out (with Full Text Search)
SQL
SELECT * FROM StudentDetails WHERE contains(University_Name,'Madras and University')
 
Share this answer
 
v2
Comments
Rakshith Kumar 30-Oct-13 0:01am    
perfect . 5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900