• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help in Left Outer join in HQL

amishrm sharma
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using struts with hibernate2. I want to do a left outer join in HQL.
Could someone tell me what I am doing wrong.
My SQL query is:

select a.CMS_ID,a.CMS_NAME,a.TIMEZONEID,b.currency_nm,a.product_cust_id ,c1.family_name,b1.sister_name
from cs_t_product_customer a,
cs_t_currency b,
cs_t_family_group c1,
cs_t_family_cms_map d1,
cs_t_sister_cms_map a1,
cs_t_sister_group b1
and d1.family_grp_id=c1.family_grp_id(+)
and a.product_cust_id=d1.product_cust_id(+)
and a1.sister_grp_id=b1.sister_grp_id(+)
and a.product_cust_id=a1.product_cust_id(+)

and my HQL query is:

select csTProductCustomer.cmsId,csTProductCustomer.cmsName,csTProductCustomer.timezoneid,csTCurrency.currencyNm,csTProductCustomer.productCustId,csTFamilyGroup.familyName,csTSisterGroup.sisterName,csTProductCustomer.noticePeriod

from CsTCurrencyErate csTCurrency,
CsTFamilyCmsMapErate csTFamilyCmsMap left outer join csTFamilyCmsMap.csTFamilyGroup csTFamilyGroup,
CsTFamilyCmsMapErate csTFamilyCmsMap1 left outer join csTFamilyCmsMap1.csTProductCustomer csTProductCustomer,

CsTSisterCmsMapErate csTSisterCmsMap left outer join csTSisterCmsMap.csTSisterGroup csTSisterGroup,
CsTSisterCmsMapErate csTSisterCmsMap1 left outer join csTSisterCmsMap1.csTProductCustomer csTProductCustomer1

where csTProductCustomer.csTCurrency.currencyId=csTCurrency.currencyId

Please Help me.

Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!