-->
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.  [ 5 posts ] 
Author Message
 Post subject: inline view in hibernate
PostPosted: Thu Jan 27, 2005 6:29 am 
Newbie

Joined: Thu Jan 27, 2005 6:27 am
Posts: 3
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:2.0

is inline view in HQL possible. if possible how and example can be given


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 6:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I have no idea what you are talking about.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 6:45 am 
Newbie

Joined: Thu Jan 27, 2005 6:27 am
Posts: 3
I am giving ex of oracle inline view. Can this kind of query is possible in HQL.

SELECT
NVL(b.tablespace_name,nvl(a.tablespace_name,'UNKOWN')) name
, kbytes_alloc kbytes
, kbytes_alloc-NVL(kbytes_free,0) used
, NVL(kbytes_free,0) free
, ((kbytes_alloc-NVL(kbytes_free,0))/kbytes_alloc)*100 pct_used
, NVL(largest,0) largest
FROM ( SELECT SUM(bytes)/1024 Kbytes_free
, MAX(bytes)/1024 largest
, tablespace_name
FROM sys.dba_free_space
GROUP BY tablespace_name
) a
, ( SELECT SUM(bytes)/1024 Kbytes_alloc
, tablespace_name
FROM sys.dba_data_files
GROUP BY tablespace_name
) b
WHERE a.tablespace_name (+) = b.tablespace_name


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 6:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
from-clause subselects are not possible, where-clause subselects are

If you need that, you can always drop back to createSqlQuery for special cases.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 6:48 am 
Newbie

Joined: Thu Jan 27, 2005 6:27 am
Posts: 3
thanks


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