Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i was using one text box and one button..
i have using this table
SQL
   ISBN       keywords       author_name         title
23232323      hi            RAJKUMAR          dffd
2223234       tty               MANOJ KUMAR     dffd
33333333333333  u            RAJKUMAR           GGG
44542232233   fgf           MANOJ KUMAR        dffd

now i was search a one column for example hi or,RAJKUMAR,OR 23232323,dffd any one that was search it. how to solve this pls help me
but i was using multiple table
Posted
Updated 3-Sep-15 22:24pm
v3
Comments
Suvendu Shekhar Giri 4-Sep-15 3:43am    
What is your DBMS? SQL Server?
MohamedEliyas 4-Sep-15 5:07am    
YES SQL SERVER
Schatak 4-Sep-15 4:27am    
Your question is unclear, are you trying to search in SQL IDE or though code?
if through your code then what is the issue?

1 solution

You can do it in two ways-
1. Usng full text search
Refere these links to understand full text search
Full-Text Search[^]
Understanding Full-Text Indexing in SQL Server[^]
2. Using multiple conditions in WHERE clause
You may build query like -
SQL
SELECT ISBN, keywords, author_name, title
FROM YourTable
WHERE ISBN LIKE '%'+@TextToSearch+'%' OR keywords LIKE '%'+@TextToSearch+'%' OR author_name LIKE '%'+@TextToSearch+'%' OR title LIKE '%'+@TextToSearch+'%'


I would recommend to use full text search.

Hope, it helps :)
 
Share this answer
 

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