码迷,mamicode.com
首页 > 数据库 > 详细

SQL导致数据减少

时间:2014-12-10 19:35:41      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:des   io   on   数据   line   sql   br   ip   rom   

注:之前的外连接筛掉了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‘

SQL导致数据减少

标签:des   io   on   数据   line   sql   br   ip   rom   

原文地址:http://www.cnblogs.com/DavidAo/p/4156092.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!