ORA-02070: database SALES does not support operator USERENV in this context
2009-12-25 13:57
661 查看
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';
(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';
相关文章推荐
- 关于ORA-02070:database xxx does not support operator USERENV in this context
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- ORA-20200: End Snapshot Id 2 does not exist for this database/instance
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [co
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner
- Database diagram support objects cannot be installed because this database does not have a valid owner.
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- Warning: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto in
- Warning: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto in
- 错误: Could not edit the data in the folder or database selected. The current version does not support editing (base, consistent, or closed)
- GWT + Spring : javax.naming.NameNotFoundException: Name userDao is not bound in this Context
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- Database diagram support objects cannot be installed because this database does not have a valid own
- Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- This version does not support documents saved in the Xcode 8
- SQL 2005 建立数据库图表时出现以下错误Database diagram support objects cannot be installed because this database does not have a valid owner 解决
- javax.naming.NameNotFoundException: Name jdbc is not bound in this Context