• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB-QL, like that?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I want to translate this SQL sentence into EJB-QL
SELECT film.date FROM film;

I think the translation should be:
SELECT OBJECT(R)
FROM Film R
WHERE R.date

am I right???
Thanks a lot!
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not like that ..
Does anyone know about an especifically EJB-QL forum?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lee,
Since there is no where clause in the SQL, there isn't one in the EJB-QL.

You could do:


Some implementations require a where clause, in which case you would do"
 
Farl Mann
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But SELECT film.date FROM film; means selecting all from date field in film table, isn't it?

SELECT OBJECT(R)FROM Film R .. means everething from Film table but not from a concise field ..

And I don't see this one: SELECT OBJECT(R)FROM Film RWHERE 1 = 1

Could this be something like:
SELECT R.date
FROM Film AS R

??
reply
    Bookmark Topic Watch Topic
  • New Topic