APP产品介绍

SELECT FP.ID 产品ID,
FP.CPDM 产品代码,
CASE WHEN XM.SJBZ IS NOT NULL THEN XM.CPMC_APP ELSE XM.XMMC END 产品名称,
CASE WHEN XM.SJBZ IS NOT NULL THEN XM.CPMC_APP ELSE XM.XMMC END 产品全称,
XM.ID 项目ID,
NVL(FP.SFJZ,0) 是否净值,
(SELECT NOTE FROM TXTDM ZD WHERE FLDM=‘TZLY’ AND ZD.IBM=FP.TZLY) 产品类型名称,
XM.CPJS 产品介绍,–20190321 YANGPEI 同步同一信托计划下的项目信息
–(SELECT MAX(CPJS) FROM TXSXM WHERE CPID IN (SELECT ID FROM TFP_CPDM WHERE XTJH =FP.XTJH ) AND CPTJS IS NOT NULL) 产品介绍,
‘CPJS’ 产品介绍附件名,
XM.ID 产品介绍附件ID, --20190321 YANGPEI 同步同一信托计划下的项目信息
– (SELECT MAX(ID) FROM TXSXM WHERE CPID IN (SELECT ID FROM TFP_CPDM WHERE XTJH =FP.XTJH ) AND CPTJS IS NOT NULL) 产品介绍附件ID,
‘/home/crm2/data/app/TXSXM/’ 产品介绍附件路径,
CASE WHEN FP.CPQZLX=0 THEN ‘无期限’
WHEN FP.CPQZLX=1 THEN TO_CHAR(ROUND(FP.CPQX/30))
WHEN FP.CPQZLX=3 THEN TO_CHAR(ROUND(FP.CPQX/12))
ELSE TO_CHAR(ROUND(FP.CPQX))
END 产品期限,
FP.CLRQ 预计成立日期,
CASE WHEN (NVL(FP.SFJZ,0)=0 AND (SELECT COUNT(1) FROM TFP_CPSYJB JB WHERE JB.CPID=FP.ID AND NVL(JB.SYL,0)>0 )>1) THEN
(SELECT TRUNC(NVL(MIN(JB.SYL),0),2) FROM TFP_CPSYJB JB WHERE JB.CPID=FP.ID AND NVL(JB.SYL,0)>0 )||’%-’||
(SELECT TRUNC(NVL(MAX(JB.SYL),0),2) FROM TFP_CPSYJB JB WHERE JB.CPID=FP.ID AND NVL(JB.SYL,0)>0 )||’%’
WHEN (NVL(FP.SFJZ,0)=0 AND (SELECT COUNT(1) FROM TFP_CPSYJB JB WHERE JB.CPID=FP.ID AND NVL(JB.SYL,0)>0 )<=1) THEN
( SELECT decode(TRUNC(NVL(MAX(JB.SYL),0),2),0,‘浮动’,TRUNC(NVL(MAX(JB.SYL),0),2)||’%’) FROM TFP_CPSYJB JB WHERE JB.CPID=FP.ID AND NVL(JB.SYL,0)>0 )
WHEN NVL(FP.SFJZ,0)=1 THEN ‘浮动’
END “业绩比较基准”,
FP.CPGM 产品规模,
FP.FXPJ 产品风险等级ID,
(SELECT ZD.NOTE from TXTDM ZD WHERE ZD.IBM=FP.FXPJ AND ZD.FLDM=‘CPFXDJ’) 产品风险等级,
‘R1’ 产品风险等级EN,
–(XM.GRRGQD/10000)||‘万起,’||NVL(XM.GRRGDZBS,1)||‘万递增’ 起投金额,

          CASE WHEN XM.GRRGQD<10000 THEN XM.GRRGQD ||'元起,'||NVL(XM.GRRGDZBS,1)||'元递增'
             ELSE  (XM.GRRGQD/10000)||'万起,'||NVL(XM.GRRGDZBS,1)||'万递增' END 起投金额,
           XM.SFHGRZ 是否投资者认定
        FROM TFP_CPDM FP,TXSXM XM
       WHERE FP.ID=XM.CPID AND XM.ID = 1855

你可能感兴趣的:(oracle)