开发者

Challenge in getting records present in Oracle but missing in MySQL

Our client has a system that is integrated to our Company application..the client system connects to Oracle database and our Company application connects to MySQL database.

The client side have given us a view on Oracle that has a set of 4 columns that resemble columns we have on our MySQL database.See below columns in Oracle database and their counterparts/equivalent in MySQL database.

Our client [ORACLE]    |    Our Company  [MySQL]

[ORACLE]               |    [MYSQL]

AK_NO                  |    Patient_File_Nr

BIL_NO                 |    Invoice_Nr

PAYMENT_AMT            |    Amount

VOUCHER_DATE           |    Insert_Date
开发者_运维技巧

I am able to generate records present to each of the databases but then I am not able to figure out a way of getting records missing in either of the databases when doing a comparison check.

How would I write PHP code that connects to both databases and does query for records in MySQL that are not present in Oracle and vice-versa.


If its a once off.. just export the data from one system into the other ( or into a third system if you don't want to make any alterations to either system), them compare using SQL.

If its a continual process, then probably just a process with php to do it, just open a database handle to each system, do your selects on the tables and compare them programmatically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜