-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: querying again
PostPosted: Tue Dec 30, 2003 11:22 am 
Newbie

Joined: Mon Dec 29, 2003 3:01 pm
Posts: 4
Hello, I'm trying to use Hibernate with oracle.
I want to do a query like this

Select from products as p where Month(p.date) = xx

but it doesn't work.

This query:
select products.date from Products as product is OK, but answer a list of timestamp's (example 2003-12-11 00:00:00.0) and I don't know what I have to do, can something help me please?
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 11:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Error message? Stack trace? Log excerpt? Does not work is not very specific


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 11:34 am 
Newbie

Joined: Mon Dec 29, 2003 3:01 pm
Posts: 4
Message showed:


Can not execute query


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 11:36 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This is not enough information. Please show your hibernate log, and anything else you can get hold of which may be relevant. And by the way, read http://www.hibernate.org/160.html


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 11:45 am 
Newbie

Joined: Mon Dec 29, 2003 3:01 pm
Posts: 4
ok, forget the error, the question is:

How can I get the month, or day, or year of the TimeStampType returned???


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 2:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
java.util.Calendar


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.