Sunday, September 8, 2013

Compare data from tables in 2 databases / MS SQL Server

Here is the SQL to compare the differences in the data in different tables with same structure. Will be helpful for comparing the data between databases. This works in MS SQL Server if both databases are on same server or if there is a linked server configured for the other database.


SELECT  * FROM
(SELECT Max(TableName) AS TableName, FIELD1, FIELD2, FIELD3
FROM (SELECT 'HRDB1..PS_MY_RECORD' AS TableName, FIELD1, FIELD2, FIELD3
FROM HRDB1..PS_MY_RECORD
UNION ALL SELECT 'HRDB2..PS_MY_RECORD' AS TableName, FIELD1, FIELD2, FIELD3
FROM HRDB2..PS_MY_RECORD ) A
GROUP BY FIELD1, FIELD2, FIELD3
HAVING COUNT(*) = 1) A
ORDER BY 1
 
Replace table names, database names and fields list accordingly.

Compare Report in CSV or HTML format

Most of us know how to do compare projects in Application Designer. But how do we take the compare report in CSV or HTML format?

Here is an article which talks about Compare Report in CSV or HTML format.

Tuesday, August 20, 2013

PeopleSoft In-Memory Project Discovery : VFO from Oracle

Yet another VFO from Oracle. This time around it is about the PeopleSoft In-Memory Project Discovery. An excellent tool which could make the project operational metrics and  financials much simpler.