• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to write hibernate query for complicated oracle query

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have following oracle query:-

select *
from sb_skill_group join
(select * from vw_sub_campaign_view ) on
(scv_skillgroup_guid = sg_uid)

I want to convert it into hibernate query. Not sure how to do it.
Please help.

Thanks
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That query looks clumsy. Why are you using a sub query?

That aside, assuming you have mapped both sb_skill_group and vw_sub_campaign_view your HQL will look pretty much exactly as your SQL does.
 
via agarwal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

I think I made a mistake in writing query. It's like this:-

select *
from sb_skill_group sg Left outer join
(select * from vw_sub_campaign_view
where status in (1,2,3,4)
) sc on
(scv_skillgroup_guid = sg_uid)
 
reply
    Bookmark Topic Watch Topic
  • New Topic