zoukankan      html  css  js  c++  java
  • ORA02070: database SALES does not support operator USERENV in this context

    insert into erp_customer3@erpsales
                  (cust_acct_site_id,
                   meaning,
                   segment2,
                   status,
                   creation_date,
                   created_by,
                   last_update_date,
                   last_updated_by)
                  select csua.cust_acct_site_id,
                         flvv.meaning,
                         gcc.segment2,
                         csua.status,
                         csua.creation_date,
                         csua.created_by,
                         csua.last_update_date,
                         csua.last_updated_by
                    from hz_cust_site_uses_all   csua,
                         fnd_lookup_values       flvv,
                         gl_code_combinations    gcc,
                         apps.fnd_flex_values_vl ffvv
                   where csua.site_use_code = flvv.lookup_code
                     and flvv.lookup_type = 'SITE_USE_CODE'
                     and flvv.language = userenv('LANG')
                     and csua.gl_id_rev = gcc.code_combination_id(+)
                     and gcc.segment2 = ffvv.flex_value(+)
                     and ffvv.flex_value_set_id(+) = 1009628
                     and csua.status = 'A';

    ERROR:ORA-02070: database SALES does not support operator USERENV in this context

    临时解决办法:

      and flvv.language = userenv('LANG')替换成and flvv.language = 'ZHS'

      另外建立临时表fnd_flex_values_vl_tmp存储fnd_flex_values_vl的数据。

            delete from fnd_flex_values_vl_tmp;
            commit;
                       
            --插入数据到临时表
            insert into fnd_flex_values_vl_tmp
            select * from apps.fnd_flex_values_vl;
            commit;

                insert into erp_customer3@erpsales
                  (cust_acct_site_id,
                   meaning,
                   segment2,
                   status,
                   creation_date,
                   created_by,
                   last_update_date,
                   last_updated_by)
                  select csua.cust_acct_site_id,
                         flvv.meaning,
                         gcc.segment2,
                         csua.status,
                         csua.creation_date,
                         csua.created_by,
                         csua.last_update_date,
                         csua.last_updated_by
                    from hz_cust_site_uses_all   csua,
                         fnd_lookup_values       flvv,
                         gl_code_combinations    gcc,
                         fnd_flex_values_vl_tmp  ffvv
                   where csua.site_use_code = flvv.lookup_code
                     and flvv.lookup_type = 'SITE_USE_CODE'
                     and flvv.language = 'ZHS'

                     and csua.gl_id_rev = gcc.code_combination_id(+)
                     and gcc.segment2 = ffvv.flex_value(+)
                     and ffvv.flex_value_set_id(+) = 1009628
                     and csua.status = 'A';

  • 相关阅读:
    javap,是 java printer 的缩写,是 JDK 自带的 Java 字节码分析工具
    这段代码的返回值在出现异常和不出现异常的情况下,分别应该是多少?
    strictfp 关键字修饰方法,即 strict float point (精确浮点)
    transient 修饰符修饰属性:不需要序列化的属性
    Java 中的 CAS 操作
    ReentrantLock 与 synchronized 的比较
    线程安全的实现方法:互斥同步、非阻塞同步、无同步方案
    J.U.C包的意义
    synchronized 原理
    什么场景下,使用 final、volatile、Atomic原子类、synchronized、J.U.C 包中的锁?
  • 原文地址:https://www.cnblogs.com/benio/p/1632073.html
Copyright © 2011-2022 走看看