-->
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: How to do that in HQL ??
PostPosted: Fri Mar 25, 2005 6:49 am 
Regular
Regular

Joined: Sat May 15, 2004 4:27 am
Posts: 79
Hi all,

i am trying to do that in HQL :

SELECT c.customer_id
FROM customer as c
WHERE c.customer_id NOT IN (5, 6, 9)

Thanks all

----
Sebastien


Top
 Profile  
 
 Post subject: Re: How to do that in HQL ??
PostPosted: Sun Mar 27, 2005 4:20 am 
Senior
Senior

Joined: Sat Jul 17, 2004 5:16 pm
Posts: 143
First of all is this a report query and not expected to return objects? I would just use JDBC if so.

If you want to get the customer objects, (and I know its not the preferred method of the proud inventors of HQL), but I like the native SQL query API. e.g.

select {c.*} from customer c where c.customer_id not in (5,6,9)
"c"
Customer.class

http://www.hibernate.org/hib_docs/refer ... -nativesql


smayemba wrote:
Hi all,

i am trying to do that in HQL :

SELECT c.customer_id
FROM customer as c
WHERE c.customer_id NOT IN (5, 6, 9)

Thanks all

----
Sebastien


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.