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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Strange search Result

Author  Topic 

neutcomp
Posting Yak Master

111 Posts

Posted - 2002-11-22 : 09:35:04
Hello,

I have a search option into my knowledgebase.

//Add to main QUERY
For i= 0 To aantal
addSQL = addSQL & " kb_id IN (SELECT kb_id FROM tbl_kb_link_cat WHERE cat_id ='"& cat_ID(i) &"')"
If i <> aantal Then
addSQL = addSQL & " OR "
End If
Next

If addSQL <> "" Then
addSQL = " AND (" & addSQL & ")"
End If

//Main search QUERY
mySQL = "select * from tbl_kb WHERE ( code LIKE '%" & searchString & "%' OR titel LIKE '%" & searchString & "%' OR description LIKE '%" & searchString & "%')" & addSQL

I have a text into my database like: request.servarvariables

No here is the problem:
- if I search for request no problem
- if I search for request. NOTTING FOUND
- if I search for request.s no problem

So should somebody tell me whats wrong the point is not a reserved word from SQL so!

Thanxx
Bjorn

Cya
Bjorn

nr
SQLTeam MVY

12543 Posts

Posted - 2002-11-22 : 09:42:45
Have you tried looking at the sql that is generated and running that in query analyser

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

neutcomp
Posting Yak Master

111 Posts

Posted - 2002-11-22 : 09:46:46
Oeps

I did not search for request. but for server. and that value is indead not in the database.

Sorry to botter you all



Cya
Bjorn
Go to Top of Page
   

- Advertisement -