关于一个HQL语句 急急急………………
from InvestmentScheduleD isd inner join fetch isd.investmentScheduleH ish inner join ish.investmentPlanH iph inner join iph.investmentPlanD ipd where isd.PlanStepID = ipd.PlanStepID and iph.InvestmentPlanStatus =1 and ish.InvestmentScheduleHStatus=1
此语句关系到的有四张表InvestmentScheduleD investmentScheduleH investmentPlanH investmentPlanD
请问写成sql应该怎么写
[解决办法]
from
InvestmentScheduleD isd
inner join
investmentScheduleH ish
on
isd.PlanStepID = ish.PlanStepID
inner join
investmentPlanH iph
on
isd.PlanStepID = iph.PlanStepID
inner join
investmentPlanD ipd
on
isd.PlanStepID = ipd.PlanStepID
where
iph.InvestmentPlanStatus =1 and ish.InvestmentScheduleHStatus=1