Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Help in Left Outer join in HQL

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
where
a.currency_id=b.currency_id
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.

 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic