I am trying to create a stmt to extract information of tables existing in database A, which are also existing in database B with new columns. I am using db_link to achieve this. This stmt will basically generate another script for adding the new columns to database A.
It constantly gives me the ORA-02070. Any idea?
stmt A
-------------------------------------------------------------------------------------------------
1 select table_name, column_name, data_default, 'other processing options'
2 from user_tab_columns@am_rdek
3 where (table_name, column_name) in
4 (select table_name, column_name
5 from user_tab_columns@am_rdek
6 minus
7 select table_name, column_name
8* from user_tab_columns)
-/
from user_tab_columns)
*
ERROR at line 8:
ORA-02070: database AM_RDEK does not support operator USERENV in this context
stmt B: Even this gives the same error
-------------------------------------------------------------------------------------------------
select table_name, decode(data_type,'NUMBER',data_type||'('||to_char(data_precision)||
decode(data_scale,'0',null,','||data_scale)||')',
'DATE',data_type,
'VARCHAR2',data_type||'('||data_length||')',
'CHAR',data_type||'('||data_length||')',null) colnam,
data_default
from user_tab_columns@rs20
where (table_name,column_name) not in
(select table_name, column_name
from user_tab_columns)
and table_name not in (select view_name from user_views@rs20);
ERROR at line 11:
ORA-02070: database AM_RDEK does not support operator USERENV in this context
rgds
amar
