-->
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.  [ 2 posts ] 
Author Message
 Post subject: Querying
PostPosted: Mon Dec 29, 2003 3:07 pm 
Newbie

Joined: Mon Dec 29, 2003 3:01 pm
Posts: 4
How can I get a query like this?

Select * from products where date.month = 11

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 3:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well, don't know what this should mean exactly, but you can do something like this, if you have mapped Product.date as a date:

Code:
FROM Product p WHERE MONTH(p.date) = 11

where MONTH is a database specific function like you would use in SQL


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.