Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB-QL, like that?  RSS feed

 
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
Sheriff
Posts: 36463
464
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

??
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!