• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB-QL, like that?

 
Lee Dow
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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!
 
Farl Mann
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not like that ..
Does anyone know about an especifically EJB-QL forum?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35743
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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

??
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!