Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Like Operator with MS Access

 
Kel Walker
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it just me or does the like operator not work with the sun.jdbc.odbc.JdbcOdbcDriver.
String sql = "SELECT * FROM test WHERE name like '*wal*' order by name;";
When this is executed in my java code no results are returned. When executed directly within Access the correct results are displayed.
Anyone else experienced the same problem. Does anyone have a like operation that works via jdbc?
Thanks.
 
Kel Walker
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry folks,
I figured it out. Although * is the MS Access wildcard the jdbc driver expects % not *.
 
Michael Matola
whippersnapper
Ranch Hand
Posts: 1817
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just deleted a post seconds ago in which I said "wildcards in SQL are % and _". Deleted it because I looked up wildcards in Access help and saw that Access does use * and ?. (Go figure.) Good that you solved the problem.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic