[jboss-user] [EJB 3.0] - Re: EJB-QL Convert timestamp to date

fhh do-not-reply at jboss.com
Thu May 31 04:56:38 EDT 2007


But this only works if 
a.) the truncated value is a parameter in the query
b.) you are actually truncing to the day.

It will not work for something like this:

  | SELECT c, d FROM Cat c, Dog d
  | WHERE extract(month from c.birthday) = extract(month from d.birthday)# AND extract(year from c.birthday) = extract(year from d.birthday)
  | 

which will return all cat/dog tuples which were  born in the same month.

Regards

Felix

P.S.: All untested, of course.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050032#4050032

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050032



More information about the jboss-user mailing list