Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb to compare data in 2 tables, produce report highlightin differences

Status
Not open for further replies.

NWildblood

Technical User
Nov 12, 2007
113
GB
I need to query two tables to establish differences in stored data and updated data received from customers, which I have done succesfully using join properties within a query; I then output the result to a report (xls)

For reasons of volume, what would be really useful is to get some code that flags up the specific changed fields rather than simply churning out entire rows of data where changes have occured - checking them proves v time consuming.

Does anyone have any ideas ? I have limited SQL knowledge but can code in VB a bit. Any pointers gratefully received... thanks.

(Have also posted this in Access Tables and Relationships)

"No-one got everything done by Friday except Robinson Crusoe...
 
Mate,

If you've isolated the records into a table, say tblDif then loop through the fields collection and compare the results of each in tblDif with destination table? On a false match write the current field name and current record PK to a results table....

JB
 
Thanks JB, will try this later. OS

"No-one got everything done by Friday except Robinson Crusoe...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top