This Procedure is comparing two table values, Specially usefull for QA having Back End Testing job, We can import any txt or excel file into our local database and then we can compare it with any other Database's Table.
Procedure is taking 6 Parameters in which 1 is optional ,
This code is displaying all common rows in both table and most important thing is , Procedure is making its own matching criteria by capturing all Primary Keys of Second Database which is source Database or you can say Production Database. and only Matching Rows will be displayed.
Hold on guys,the most important part of the Procedure is still remaining , you can get the query generated behind the scene and can modify that query as per your requirement. just clink of the tab Messages and you will get the Dynamic Query behind the scene,
Just copy the query from message window and play, For Example you can get the rows which are not matching but just changing WHERE EXISTS clause with WHERE NOT EXISTS
Alright Guys See you next time with something different