我有個SQL 要跨DB
但不知道如何做到用一個sessionFactory可以完成
select A.TX_SN,A.CCDS_SERNO,A.MSG_TIME,A.CCDS_CODE,A.CLIENT_DEVICE,B.SERV_NM,B.EVENT_NM,(select CCDS_TOKEN from CCDSDB.CCDS_CUST where CCDS_SERNO=A.CCDS_SERNO) AS CCID
,(select RES_MSG from CCDSDB.CCDS_RES_CODE where A.CCDS_CODE=RES_CODE and LAN_CODE = 'zh') as RES_MSG "
,A.TX_ID
from CCDSDB_LOG.CCDS_API_LOG AS A
Inner join CCDSDB.CCDS_API_CTL AS B on A.TX_ID=B.API_CODE where A.MSG_TIME >= '2023-01-11 00:00:00' and A.MSG_TIME <= '2023-09-11 00:00:00' and A.
MSG_TYPE = '2'
有沒有可能在其中一個DB傳參數進去撈取可跨DB資料...