select A.ENT_ID,A.LBL_SEQ_NBR,PRIM_VND_NM,CHARTC_VAL_DESC, A.EXP_TYP_NBR from mlt_vnd_alloc A INNER JOIN XMT_VND V ON A.ENT_ID = V.ENT_ID LEFT OUTER JOIN TVSCHVL B ON A.LBL_SEQ_NBR = B.CHARTC_SEQ_NBR AND (b.CHARTC_SEQ_NBR <> 0) AND (CHARTC_CDE =3) WHERE ( A.EFF_BEG_DTE <= '2010-06-09' AND A.EFF_END_DTE >= '2010-06-09') ORDER BY A.ENT_ID,A.LBL_SEQ_NBR
I would like to generate the above sql using hibernate. The problem iam facing is, Iam not able to give conditions for the outer join before the where condition
select A.ENT_ID,A.LBL_SEQ_NBR,PRIM_VND_NM,CHARTC_VAL_DESC, A.EXP_TYP_NBR from mlt_vnd_alloc A INNER JOIN XMT_VND V ON A.ENT_ID = V.ENT_ID LEFT OUTER JOIN TVSCHVL B ON A.LBL_SEQ_NBR = B.CHARTC_SEQ_NBR AND (b.CHARTC_SEQ_NBR <> 0) AND (CHARTC_CDE =3) WHERE ( A.EFF_BEG_DTE <= '2010-06-09' AND A.EFF_END_DTE >= '2010-06-09') ORDER BY A.ENT_ID,A.LBL_SEQ_NBR
It always generates after the where condition. How can i do that.
|