This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 1820
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic