【发布时间】:2021-05-01 13:42:02
【问题描述】:
我正在为以下 SQL 查询编写 JPA 查询。我对此很陌生。你能帮帮我吗..!!
提前谢谢你。
select distinct
sdsmbr.MCID,sdsmbr.HCID,sdsmbr.SOR_CD,ehubsdsmbr1_.MBR_SQNC_NBR,ehubsdsmbr1_.NEW_MBR_CD, ehubsdsmbr1_.SBSCRBR_ID,ehubsdscvr3_.CVRG_EFCTV_DT,ehubsdscvr3_.CVRG_TRMNTN_DT,
ehubsdscvr3_.CVRG_STTS_CD,cntrct.CNTRCT_TYPE_CD
from
EHUB_MBR_SDS.EHUB_SDS_MBR sdsmbr
inner join
EHUB_MBR_SDS.EHUB_SDS_MBR_CNTRCT ehubsdsmbr1_
on sdsmbr.EHUB_MBR_ID=ehubsdsmbr1_.EHUB_MBR_ID
inner join
EHUB_MBR_SDS.EHUB_SDS_CNTRCT cntrct
on ehubsdsmbr1_.CNTRCT_ID=cntrct.CNTRCT_ID
inner join
EHUB_MBR_SDS.EHUB_SDS_CVRG ehubsdscvr3_
on ehubsdsmbr1_.EHUB_MBR_CNTRCT_ID=ehubsdscvr3_.EHUB_MBR_CNTRCT_ID
where sdsmbr.SOR_CD = 'test'
and ( ehubsdsmbr1_.MBR_SQNC_NBR ='test' or ehubsdsmbr1_.NEW_MBR_CD ='test')
and (sdsmbr.HCID ='test' or ehubsdsmbr1_.SBSCRBR_ID ='test');
【问题讨论】:
标签: sql jpa spring-data-jpa