SQL from WEBI report:
SELECT
ARS_BK_ELIG_MSTR_FACT.CLI_TRD_ALW_STRT_C ,
ARS_BK_ELIG_MSTR_FACT.ACC_I,
DECODE (ARS_OWNER.ARS_PRODUCT_DIMN.PRO_CLASFN_C, 'DAPR',
ARS_BK_ELIG_MSTR_FACT.AST_CURR_INT_Z *
ARS_OWNER.ARS_PRODUCT_DIMN.PAR_VAL_A, 'MBAC',
ARS_BK_ELIG_MSTR_FACT.AST_CURR_INT_Z)
DECODE (ARS_OWNER.ARS_PRODUCT_DIMN.PRO_CLASFN_C, 'DAPR',
ARS_BK_ELIG_MSTR_FACT.AST_CURR_EXT_Z *
ARS_OWNER.ARS_PRODUCT_DIMN.PAR_VAL_A, 'MBAC',
ARS_BK_ELIG_MSTR_FACT.AST_CURR_EXT_Z),
CASE WHEN Table__189.ACC_N IS NULL THEN 'N' ELSE 'Y'
END,
DWCSADM.ACCT_DIMN_CURR.FA_I,
ARS_BK_ELIG_MSTR_FACT.ACC_N
FROM
SELECT DISTINCT ARS_OPTIN_FACT.ACC_N
from ARS_OPTIN_FACT
WHERE ARS_OPTIN_FACT.ARS_DOC_C <>'S9'
) Table__189,
ARS_BK_ELIG_MSTR_FACT,
ARS_OWNER.ARS_PRODUCT_DIMN,
DWCSADM.ACCT_DIMN_CURR
WHERE
( ARS_OWNER.ARS_PRODUCT_DIMN.PW_SCTY_I=ARS_BK_ELIG_MSTR_FACT.PW_SCTY
_I AND ARS_OWNER.ARS_PRODUCT_DIMN.CURR_VER_C = 'Y' )
AND ( Table__189.ACC_N(+)=ARS_BK_ELIG_MSTR_FACT.ACC_N )
AND ( DWCSADM.ACCT_DIMN_CURR.ACC_N=ARS_BK_ELIG_MSTR_FACT.ACC_N )
AND ( ARS_BK_ELIG_MSTR_FACT.CLI_TRD_ALW_STRT_C IS NOT NULL )
AND
ARS_BK_ELIG_MSTR_FACT.EDW_PSTG_D = '13-10-2010 00:00:00'
AND
ARS_BK_ELIG_MSTR_FACT.AST_CURR_INT_Z+ARS_BK_ELIG_MSTR_FACT.AST_CURR_E
XT_Z > 0
AND
ARS_OWNER.ARS_PRODUCT_DIMN.CURR_VER_C = 'Y'
AND
DWCSADM.ACCT_DIMN_CURR.CURR_VER_C = 'Y'
AND
ARS_OWNER.ARS_PRODUCT_DIMN.PW_SCTY_I =
ARS_BK_ELIG_MSTR_FACT.PW_SCTY_I
SQL from backend:
SELECT DISTINCT
ARS_BK_ELIG_MSTR_FACT.CLI_TRD_ALW_STRT_C ,
ARS_BK_ELIG_MSTR_FACT.ACC_I,
DECODE (ARS_OWNER.ARS_PRODUCT_DIMN.PRO_CLASFN_C, 'DAPR',
ARS_BK_ELIG_MSTR_FACT.AST_CURR_INT_Z * ARS_OWNER.ARS_PRODUCT_DIMN.PAR_VAL_A,
'MBAC', ARS_BK_ELIG_MSTR_FACT.AST_CURR_INT_Z)
,
DECODE (ARS_OWNER.ARS_PRODUCT_DIMN.PRO_CLASFN_C, 'DAPR',
ARS_BK_ELIG_MSTR_FACT.AST_CURR_EXT_Z * ARS_OWNER.ARS_PRODUCT_DIMN.PAR_VAL_A,
'MBAC', ARS_BK_ELIG_MSTR_FACT.AST_CURR_EXT_Z),
CASE WHEN Table__189.ACC_N IS NULL THEN 'N' ELSE 'Y'
END,
DWCSADM.ACCT_DIMN_CURR.FA_I,
ARS_BK_ELIG_MSTR_FACT.ACC_N
FROM
SELECT DISTINCT ARS_OPTIN_FACT.ACC_N
from ARS_OWNER.ARS_OPTIN_FACT
WHERE ARS_OPTIN_FACT.ARS_DOC_C <>'S9'
) Table__189,
ARS_OWNER.ARS_BK_ELIG_MSTR_FACT,
ARS_OWNER.ARS_PRODUCT_DIMN,
DWCSADM.ACCT_DIMN_CURR
WHERE
( ARS_OWNER.ARS_PRODUCT_DIMN.PW_SCTY_I=ARS_BK_ELIG_MSTR_FACT.PW_SCTY_I AND
ARS_OWNER.ARS_PRODUCT_DIMN.CURR_VER_C = 'Y' )
AND ( Table__189.ACC_N(+)=ARS_BK_ELIG_MSTR_FACT.ACC_N )
AND ( DWCSADM.ACCT_DIMN_CURR.ACC_N=ARS_BK_ELIG_MSTR_FACT.ACC_N )
AND ( ARS_BK_ELIG_MSTR_FACT.CLI_TRD_ALW_STRT_C IS NOT NULL )
AND
ARS_BK_ELIG_MSTR_FACT.EDW_PSTG_D = '13-OCT-2010'
AND
ARS_BK_ELIG_MSTR_FACT.AST_CURR_INT_Z+ARS_BK_ELIG_MSTR_FACT.AST_CURR_EXT_Z >
0
AND
ARS_OWNER.ARS_PRODUCT_DIMN.CURR_VER_C = 'Y'
AND
DWCSADM.ACCT_DIMN_CURR.CURR_VER_C = 'Y'
AND
ARS_OWNER.ARS_PRODUCT_DIMN.PW_SCTY_I = ARS_BK_ELIG_MSTR_FACT.PW_SCTY_I