comparision of data into in two different schema.
698599Apr 28 2009 — edited Apr 28 2009Hi,
I am new to the Forums & this is my first post.
Currently, I am working on a customer engagement & one of the problems I am facing is the difference between the data in tables in two schemas -
The senario is as
There are two schema ---- schema1 & schema2
The are same table in schema1 and schema2 but there are some extra columns in schema1 the extra columns in schema1 start with schma1_.
we want to compair the data in the tables in both the schema.
we are following below process
select stragg(column_name) into v_repo_col_name from all_tab_columns where table_name =upper(c1_rec.name) and column_name not like'schma1_%' order by 1 desc;
v1_sql := 'select ' || v_repo_col_name||' from ' || c1_rec.name ||' where '|| v_where ||' MINUS ' ||' select ' ||
v_repo_col_name||' from ' ||v_clent_schma_name||'.'|| c1_rec.name ||'@'||v_clent_db || ' where '|| v_where ;
v2_sql := 'select ' || v_repo_col_name||' from ' ||v_clent_schma_name||'.'|| c1_rec.name ||'@'||v_clent_db || ' where '|| v_where ||'
MINUS ' || 'select ' || v_repo_col_name||' from ' || c1_rec.name ||' where '|| v_where ;
EXECUTE IMMEDIATE v_repo_clent_sql;
This EXECUTE IMMEDIATE is displaying the SQL QUERY
we want to display the result from this SQL,
I feel this is a crude approach & feel I am reinventing the wheel.
Can you please tell me if there are any Tools that already adresss this problem ?
Regards,
Rajeev