wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Implementing Union All in hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Implementing Union All in hibernate" Watch "Implementing Union All in hibernate" New topic
Author

Implementing Union All in hibernate

Swapna latha
Ranch Hand

Joined: Dec 18, 2011
Posts: 68
SELECT LSEO.SEOID AS SEOID, SEO.SEOID AS WWSEOID, SEO.PARNTMACHTYPE AS PARNTMACHTYPE, SEO.PARNTMOD AS PARNTMOD, SEO_CONFIG.FEATURE AS FEATURE, SEO_CONFIG.CONFQTY AS CONFQTY
,'W' as LOCALIND,'HW' as HWIND
FROM <dbschema>.LSEO LSEO, <dbschema>.SEO SEO, <dbschema>.SEO_CONFIG SEO_CONFIG WHERE SEO.SEOID = LSEO.WWSEOID AND SEO_CONFIG.SEOID = SEO.SEOID
union all
SELECT LSEO.SEOID AS SEOID, SEO.SEOID AS WWSEOID, SEO.PARNTMACHTYPE AS PARNTMACHTYPE, SEO.PARNTMOD AS PARNTMOD, SEO_SW_CONFIG.FEATURE AS FEATURE, SEO_SW_CONFIG.CONFQTY AS CONFQTY ,'W' as LOCALIND,'SW' as HWIND
FROM <dbschema>.LSEO LSEO, <dbschema>.SEO SEO, <dbschema>.SEO_SW_CONFIG SEO_SW_CONFIG WHERE SEO.SEOID = LSEO.WWSEOID AND SEO_SW_CONFIG.SEOID = SEO.SEOID
union all
SELECT LSEO.SEOID AS SEOID, SEO.SEOID AS WWSEOID, SEO.PARNTMACHTYPE AS PARNTMACHTYPE, SEO.PARNTMOD AS PARNTMOD, LSEO_CONFIG.FEATURE AS FEATURE, LSEO_CONFIG.CONFQTY AS CONFQTY ,'L' as LOCALIND,'HW' as HWIND
FROM <dbschema>.LSEO LSEO, <dbschema>.SEO SEO, <dbschema>.LSEO_CONFIG LSEO_CONFIG WHERE SEO.SEOID = LSEO.WWSEOID AND LSEO_CONFIG.SEOID = LSEO.SEOID
union all
SELECT LSEO.SEOID AS SEOID, SEO.SEOID AS WWSEOID, SEO.PARNTMACHTYPE AS PARNTMACHTYPE, SEO.PARNTMOD AS PARNTMOD, LSEO_SW_CONFIG.FEATURE AS FEATURE, LSEO_SW_CONFIG.CONFQTY AS CONFQTY ,'L' as LOCALIND,'SW' as HWIND
FROM <dbschema>.LSEO LSEO, <dbschema>.SEO SEO, <dbschema>.LSEO_SW_CONFIG LSEO_SW_CONFIG WHERE SEO.SEOID = LSEO.WWSEOID AND LSEO_SW_CONFIG.SEOID = LSEO.SEOID






How to implement the above query in HIberante.as Hiberante Does not support Union All functioanlity.

Thanks in advance
Swapna
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
Hi,

Try using

..createSQLQuery

I hope this should resolve your problem.
Swapna latha
Ranch Hand

Joined: Dec 18, 2011
Posts: 68
i have used but no use
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
what problem your are facing ?!

Please provide the details in detail
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing Union All in hibernate
 
Similar Threads
JavaRanch stewardship and SEO
SEO and AJAX
SEO
prepared statement with "in" predicate
bigger value in function MAX(x,y)