简体   繁体   中英

i have some problem with left join JPQL

there is something wrong with ths way i use left join, and i dont understand what am i doing wrong.

can you see it?

select distinct r.globalRuleId,
       r.ruleId,                                                     
       sv.validFrom,
       pm.moduleId,
       nvl(min(rai.failedOnRegistration),0)

from TRules r,
     TSlaVersions sv, 
     TModuleFormulas mv, 
     TPendingModule pm,
     left join TRulesAdditionalInfo rai on r.ruleId = rai.ruleId

where r.slaVersionId = sv.slaVersionId
      and r.formulaId = mv.pk.formulaId
      and mv.pk.moduleId = pm.moduleId

group by r.globalRuleId,
         r.ruleId,                                                     
         sv.validFrom,
         pm.moduleId

order by pm.moduleId

After reformatting your source, I think it's easy to spot: There's a , before left join .

Proper formatting and indentation are really your best SQL friends. If you don't want to do this manually, I suggest using an SQL client like SquirrelSQL :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM