显示标签为“procedures”的博文。显示所有博文
显示标签为“procedures”的博文。显示所有博文

2012年3月27日星期二

full text searching

Ok

Im trying to get full text searching to work with parameterised stored procedures.

basicly the proc is

SELECT IndustrySector.title, BiblioHeadings.BiblioHeading, ReferenceTypes.ReferenceType, Bibliographies.Authors, Bibliographies.PublishDate, Bibliographies.BiblioTitle,

Publishers.Publisher, Bibliographies.Journal, Bibliographies.Issue, Bibliographies.BiblioKeyWords, Bibliographies.BiblioAnnotation, Bibliographies.Note,

Bibliographies.BiblioURL, IndustrySector.id

FROM Bibliographies INNER JOIN

BiblioHeadings ON Bibliographies.BiblioHeadingID = BiblioHeadings.BiblioHeadingID INNER JOIN

Publishers ON Bibliographies.PublisherID = Publishers.PublisherID INNER JOIN

ReferenceTypes ON Bibliographies.Reference = ReferenceTypes.ReferenceTypeID INNER JOIN

IndustrySector ON Bibliographies.SectorID = IndustrySector.id

WHERE CONTAINS(BiblioAnnotation, @.SearchFor_txt )

this works as long as only one word is in the @.SearchFor_txt parameter.

How to I get it to work with more than one word?

can I put the parameters in quote marks such as '" @.SearchFor_txt "' ? (I know this dosnt work with parameters but I need to contain the string)

any know how to resolve this issue please

jim

Books on line says

CONTAINS can search for:

A word or phrase.

The prefix of a word or phrase.

A word near another word.

A word inflectionally generated from another (for example, the word drive is the inflectional stem of drives, drove, driving, and driven).

A word that is a synonym of another word using thesaurus (for example, the word metal can have synonyms such as aluminum and steel).

2012年3月21日星期三

full text search

how do i prepare a db for a full text search on a table? are there any
special procedures or tutorials on this? i have an article db which i need
to do a full text search with boolean operators on a articlecontents field..
ive never programmed a full text search before, so any help is welcome,
thanks!Brian,
The best place to look for introduction information on SQL Server (7.0 or
2000) Full-Text Search (FTS) components is the BOL. Use the search tab and
search for "full text" (use the double quotes) as this will point you to the
titles "Full-Text Query Architecture" among others.
You can use the "Full-text Indexing" Wizard via the Query Analyzer or
Enterprise Manager as well as right-click on a table in the EM and select
Full-text Index and this will launch the FT Wizard as well as FT-enable the
database (use sp_fulltext_database behind the scenes). Once you've got the
FT Index created and populated you can query it with either CONTAINS or
FREETEXT (both are documented in the BOL)
Also a good source of SQL FTS related questions can be posted to the
newsgroup: microsoft.public.sqlserver.fulltext
Regards,
John
"Brian Henry" <brianiup@.adelphia.net> wrote in message
news:OwqjUOnjDHA.2964@.tk2msftngp13.phx.gbl...
> how do i prepare a db for a full text search on a table? are there any
> special procedures or tutorials on this? i have an article db which i need
> to do a full text search with boolean operators on a articlecontents
field..
> ive never programmed a full text search before, so any help is welcome,
> thanks!
>sql

2012年3月7日星期三

FULL SEARCH

Is there a simple way to search all the views/stored procedures in a database which contain particular text without having to open each one?

The object search which i thought might work in query analyzer will only search by object name so thats a dead end.

A point to make here though... you should have ALL of your system object create/alter scripts stored to file and preferably a source control system (like VSS). You could take this as an opportunity to save everything to file. You can then easily use the windows search function (or similar) to search inside those files.