Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have a table in access 2003 and I want to use like statement in it but I can't.
My query is like this:
Select * from Mytbl where title like '*news *'

and I also use this:
Select * from Mytbl where title like '%news%'

none of them work.
I mean they don't return any row.
Posted
Updated 13-Dec-10 19:32pm
v2
Comments
JF2015 14-Dec-10 1:33am    
Edited for code formatting and spelling.

Try this,
Select * from Mytbl where title like '*news'

or
Select * from Mytbl where title like 'news*'

or
Select * from Mytbl where title like '*news*'
 
Share this answer
 
v3
Comments
Toniyo Jackson 14-Dec-10 1:54am    
I dont know, what is your problem. Actually this is the correct answer.
davmszd 14-Dec-10 2:14am    
thanks toni
dear ToniyoJackson
i should mention that at first i m using that in access not in vb .net code it does not any row
i try your suggestion but again it does not return any row
 
Share this answer
 
Comments
Toniyo Jackson 14-Dec-10 1:51am    
Don't write your comments here. You have add comment button below all answers. so write your comments below the appropriate answer
Toniyo Jackson 14-Dec-10 1:52am    
Do u have any data in table with title as news?
davmszd 14-Dec-10 1:53am    
i do have data in my table
Toniyo Jackson 14-Dec-10 1:58am    
First u read this article and learn how and where to give *.
http://www.ehow.com/how_4547073_microsoft-access-using-like-operator.html
davmszd 14-Dec-10 2:01am    
i have read them all
and i also use like in sql transaction
but in access 2003 i got into problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900