SQL导致数据减少
注:之前的外连接筛掉了cdl.aim_code为null的数据,改成临时表的写法。
From
(select fv.description,
fv.flex_value
from fnd_flex_values_vl fv,
fnd_flex_value_sets fvs
where fv.flex_value_set_id = fvs.flex_value_set_id
AND fvs.flex_value_set_name = ‘20_INV_DOC_LINE_AIM_CODE‘
AND fv.enabled_flag = ‘Y‘
) AA
Where
AND AA.FLEX_VALUE(+) = cdl.aim_code;
代替
From fnd_flex_values_vl fv,
fnd_flex_value_sets fvs
Where
AND fv.flex_value_set_id = fvs.flex_value_set_id
AND fvs.flex_value_set_name = ‘20_INV_DOC_LINE_AIM_CODE‘
AND cdl.aim_code = fv.flex_value(+)
AND fv.enabled_flag = ‘Y‘
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。