Thursday, April 2, 2015

How to Find Source Table Updated Rows using Tsql Script

Hi Cherukuri19,



Regarding your description, Ronnie_Rahman's reply looks reasonable.



As mentioned you want only rows Which are Updated but not New rows, adding one where clause would be ok.




SELECT * FROM SourceTable WHERE ID IN(SELECT ID FROM StagingTable)
EXCEPT
SELECT * FROM StagingTable



If you have any question, feel free to let me know.



Eric Zhang

TechNet Community Support




No comments:

Post a Comment