Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-10-25 : 17:36:08
|
Rajendran menon writes "Hi,
In one of my on-going projects, I am trying to use the Full Text Search feature of SQL 7.0. When I tried to use the following stored procedure, I am not getting any result. The problem is that I am unable to pass the value of strSearchstring, which is used in the SP. However, if I hard code any value for strSearchstring, the query works.
1. Is this the correct way to use Contains? Can I have just one Contains and then put the rest of the stuff inside the bracket after contains?
2. How to pass the value to sp when using contains ?
The calling page is an ASP page which uses a DLL (created using VB) which in turn calls the SP.
Thanking you,
Rajendan Menon
The stored procedure is as under
CREATE Procedure sp_UrlSearch(@strSearchstring varchar(50), @intURLHeader int ,@intLicenseeId int) as
begin
if @intLicenseeId =0 select @intLicenseeId =null
SELECT distinct gin_urllinklib.url,gin_urllinklib.companyname, gin_urllinklib.Description,gin_urllinklib.datecreate, gin_urllinklib.g1000 from gin_urllinklib,gin_customisedlinks where gin_urllinklib.urlid = gin_customisedlinks.urlid and gin_customisedlinks.Licenseeid = IsNull(@intLicenseeId, gin_customisedlinks.Licenseeid) and ( contains( URL , ' " + @strSearchstring + " ' ) or contains (CompanyName , ' " + @strSearchstring + " ' ) or contains(Description , ' " + @strSearchstring + " ' ) or contains(Keyword, ' " + @strSearchstring + " ' ) ) order by 2 end
" |
|
|
|
|
|
|
|