select distinct V.cCodeRubrique, r.cLibcourt, r.ctypenombre
FROM tparamjournal V ,trubpay r , thistdetailpaie p
where r.ccoderubrique = v.ccoderubrique
AND V.cCodeRubrique *= P.cCodeRubrique
and v.codeetat = 'JRN12'
The result is ok
1 BASE SALRY
8 TRANSPORT PR
35 AV. NAT LOG
37 BIK_LOG
40 Coeff GM
300 GROSS SAL
Since the sql version no longer includes the notion of (* =)
rewrote the request:
select distinct V.cCodeRubrique, r.cLibcourt, r.ctypenombre
FROM tparamjournal V
INNER join trubpay r on r.ccoderubrique = v.ccoderubrique
LEFT OUTER JOIN thistdetailpaie p
on v.cCodeRubrique = P.cCodeRubrique
where v.codeetat = 'JRN12'
THE RESULT
1 BASE SALRY
8 TRANSPORT PR
35 AV. NAT LOG
300 GROSS SAL
So I do not have the 37 and 40 that are not in the table "thistdetailpaie"
Select V.cCodeRubrique ,r.cLibcourt, r.ctypenombre from tparamjournal V
inner join trubpay r on V.ccoderubrique = r.ccoderubrique
left join thistdetailpaie p on V.ccoderubrique = p.ccoderubrique where v.codeetat = 'JRN12'
Select V.cCodeRubrique ,r.cLibcourt, r.ctypenombre from tparamjournal V
inner join trubpay r on V.ccoderubrique = r.ccoderubrique
CROSS join thistdetailpaie p
where v.codeetat = 'JRN12'