-->
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 execute inner join in HQL
PostPosted: Fri Mar 02, 2012 3:27 am 
Newbie

Joined: Fri Mar 02, 2012 3:17 am
Posts: 1
Hi all,

I am new to HQL.
My question is how to execute inner join inside HQL query??

Here is my sql query, can i execute this using "getHibernateTemplate().find()" method.

Code:
select * from emp_timesheet_master etm
inner join (select tp.period_start_date s_date,tp.period_end_date e_date from timesheet_periods tp,financial_year fy where fy.year_status='A' and tp.period_status='A' and fy.financial_year_id=tp.fiscal_year_id and fy.company_code='"+employee.getCompany_code()+"') ft on
ft.s_date=etm.start_date and ft.e_date=etm.end_date where etm.company_code='"+employee.getCompany_code()+"' and etm.employee_id='"+employee.getEmployee_id()+"' order by etm.timesheet_id



Can anyone help me...???

Thanks in advance,
Jerry


Top
 Profile  
 
 Post subject: Re: How to execute inner join in HQL
PostPosted: Sat Mar 03, 2012 3:33 am 
Newbie

Joined: Fri Feb 17, 2012 8:20 am
Posts: 18
Check this, will be very useful to you.....

Hibernate HQL and Inner Joins Explanation and Examples


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.