One of the requirements I have lately is to compare table data between two different environments (Development and Test).
The Oracle SQL below compares table1 that has 2 key fields and 3 regular fields.
Note: For the SQL below to work, your password needs to be the same in both environments. If not, then
a connection using the below will not be possible.
| Title | Under | Posted on |
|---|---|---|
| MD5 - SHA checksum of a file. | PeopleSoft Technical | 02/07/2012 - 5:29am |
| nVision Tabular Report through PIA with prompts | PeopleSoft Technical | 02/02/2012 - 10:07pm |
| Can we create an AE to mass update Position - Jobcode data? | PeopleSoft Technical | 01/18/2012 - 3:11am |
| Pay Components on job data can be defaulted and setup based on the rules? | PeopleSoft Functional | 01/05/2012 - 4:58am |
Comments
thanks for the sharing the info
Lepa,
Thank for sharing.
I don't think that the password needs to be the same. The db link user needs to have select access to the relevant table.
Also, I have successfully used minus operator.
SELECT 'ENV1', col1, col2, col3
FROM table
MINUS
SELECT 'ENV1', col1, col2, col3
FROM table@dblink
UNION ALL
SELECT 'ENV2', col1, col2, col3
FROM table@dblink
MINUS
SELECT 'ENV2', col1, col2, col3
FROM table
ORDER BY 2,3,1
If there are multiple tables to compare, this is easier to build. Also, rows in one table and not the other get picked up which will not show up in the sql you are using.
hi guys i am tryin to compare data from two identical tables E6900 and M9000 and this my DBlink ops$mis_exec.mis_sub_prof@prod
so my query is as follows i am not sure whether i am on the right track
select * from ops$mis_exec.mis_sub_prof@prod minus select * from ops$mis_exec.mis_sub_prof;
Post new comment