HOW TO WRITE SEARCH ENGINE QUERY FOR A DATABASE CONTAIN 3 TABLES
-
12 Maret 2012 7:01
HOW TO WRITE SEARCH ENGINE QUERY FOR A DATABASE CONTAIN 3 TABLES
IMAGINE DATABASE NAME STUDENTDETAIL
WHICH
IS HAVING 3 TABLE
1. FACULTY
2.STUDENT
3.OFFICE STAFF
THE THREE TABLE ARE INNER JOINED BY PRIMARY KEY AND FOREGIN KEYS
IF ANY ONE FIND SOLUTION PLEASE SHARE
FOR EXAMPLE IF I AM SEARCH ING
A WORD 'BALA WHEERE'
IAM JUST TRYING THIS BUT I DIDNT FIND SOLUTION
Semua Balasan
-
12 Maret 2012 8:34
Your descriptions are not complete. What do you mean by a 'Search Engine Query'? If you want to find rows having a particular name then you can use a simple LIKE predicate like this:
SELECT * FROM Faculty WHERE FacultyName LIKE '%BALA WHEERE%'
However this will not be SARGable (index freindly). If your application has to do a wide variety of character searches then the best option is to go for Full Text Search feature in SQL Server. Have a look at the below link for a start up.
- Krishnakumar S
- Disarankan sebagai Jawaban oleh Naomi NMicrosoft Community Contributor, Moderator 12 Maret 2012 17:49
- Ditandai sebagai Jawaban oleh Iric WenModerator 19 Maret 2012 8:50
-
12 Maret 2012 17:03Penjawab Pertanyaan
The following article has a stored procedure to search the entire database for a keyword:
http://www.sqlusa.com/bestpractices2008/searchalltablesallcolumns/
Kalman Toth SQL SERVER & BI TRAINING
-
12 Maret 2012 19:23please provide sample table and data scripts for more help. your question is not clear
John
http://knowledgy.org