-->
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.  [ 3 posts ] 
Author Message
 Post subject: retrieving one instance of each one
PostPosted: Thu May 31, 2012 12:22 pm 
Newbie

Joined: Mon Oct 19, 2009 4:33 pm
Posts: 8
I got this:
SELECT o.empresa FROM Actas o

Empresa may has Many Actas, Actas has only on Empresas
So, I want all instances of Empresa that are present on Actas, but I want to avoid repeated instances of Empresa.
I tried with Group by o.empresa....... didn't work.

How could I do this?


Top
 Profile  
 
 Post subject: Re: retrieving one instance of each one
PostPosted: Thu May 31, 2012 10:15 pm 
Senior
Senior

Joined: Wed Sep 19, 2007 9:31 pm
Posts: 191
Location: Khuntien (Indonesia)
Hi,

Have you tried to distinct it?

Thanks


Top
 Profile  
 
 Post subject: Re: retrieving one instance of each one
PostPosted: Fri Jun 01, 2012 6:32 am 
Newbie

Joined: Mon Oct 19, 2009 4:33 pm
Posts: 8
No, I tried distinctS, that's why didnt work neither ¬¬
I just needed a slap!
Thanks

PD: why do you say thanks?


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