Reputation: 4997
I am trying to get data from my Access database using like operator. For example my ProducID contains NoteBook, Notes etc. Using like operator, I want to get them all shown if user types No etc. Like operator did not give any errors but it only shows record when I put full NoteBook (does not show for Notes offcourse)
Please note I want to use the query in dataset (as shown in the pic)
Please advise how to fix it.
Thanks
Upvotes: 0
Views: 539
Reputation: 91376
The wildcard is % or *, depending on what you are using to connect, in this case I suggest:
SELECT ... FROM Table WHERE ProductCode LIKE '%'
Regardless of the data type.
Upvotes: 0
Reputation: 21098
When you passed in the string "No" did you add the wildcard *No* before and after it to ensure it would return items with no anywhere in the string?
If you only want everything after "No" then you would want "No*".
Upvotes: 1