madanthrax
IS-IT--Management
Hi,
I have a website that displays Technical Publications. Its ASP with MS SQL. Visitors can browse for publications by topic. I now need to create a search by "title text". I have made an input form and a page to display results using the code below to create the SQL query:
This works but with a major drawback.
A typical title is "Design of Fuel Handling and Storage Systems in Nuclear Power Plants Safety Guide"
If the user types in the search text box "Fuel Handling" a list of publications containing that phrase appear. If the users types in "Fuel Storage" then nothing is found.
I have tried using CONTAINS in the SQL but the source of 90% my data comes from a view from another database so setting up full-indexing to support the CONTAINS seems improbable.
Does anyone have any suggestions how I could work around this problem please. The database has less than 500 publications in it so performance should be a factor.
I have a website that displays Technical Publications. Its ASP with MS SQL. Visitors can browse for publications by topic. I now need to create a search by "title text". I have made an input form and a page to display results using the code below to create the SQL query:
Code:
stext = (request.form("searchtext")
where = "WHERE Title LIKE '%"& stext &"%' COLLATE SQL_Latin1_General_CP1_CI_AS AND (SeriesID ='32' OR SeriesID ='33')"
SQL = "SELECT PubId, Title, Issued, Released, ElectronicFile, FileSize, SeriesInfo, SeriesText, DocType, FrenchURL, SpanishURL, RussianURL, ArabicURL, ChineseURL, DocType
FROM dbo.vw_SS_3 "& where &" order by Released desc"
This works but with a major drawback.
A typical title is "Design of Fuel Handling and Storage Systems in Nuclear Power Plants Safety Guide"
If the user types in the search text box "Fuel Handling" a list of publications containing that phrase appear. If the users types in "Fuel Storage" then nothing is found.
I have tried using CONTAINS in the SQL but the source of 90% my data comes from a view from another database so setting up full-indexing to support the CONTAINS seems improbable.
Does anyone have any suggestions how I could work around this problem please. The database has less than 500 publications in it so performance should be a factor.
[sub]"Nothing is impossible until proven otherwise"[/sub]