• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

About dynamic query in chapter 7 of JPA Pro 2nd edition

 
Bartender
Posts: 2453
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, the book shows a query:


The book says the query created will have a single quote prefix of empName like this:
SELECT e.salary  FROM Employee e WHERE e.department.name = 'NS65' AND e.name = ''Roberts' ;

Roberts becomes 'Roberts. And it won't find Robert's record.
However, after I tried a few times with this created query, it can find the Robert's record.

reply
    Bookmark Topic Watch Topic
  • New Topic