|
-
Jan 1st, 2005, 12:42 AM
#3
Thread Starter
Addicted Member
Re: Like operator
Hi thanks for your solution. It works with a little bit of changes.
Thanks
 Originally Posted by vb_dba
When you perform your comparison, you are searching for Like "*Bank, NBFI*". You would need to be able to ammend your query to add a Like clause for each keyword:
VB Code:
Dim sSql
Dim arrKeyWord
Dim i
arrKeyWord = Split(sKeyWordString, ",")
sSql = "Select * From myTable Where "
For i = LBound(arrKeyWord) To UBound(arrKeyWord)
sSql = sSql & "keywordfield Like '*" & arrKeyWord(i) & "*' AND "
Next
'Remove the trailing AND
sSql = Left(sSql, Len(sSql) - 5)
Or something to that effect.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|