0

Compare two fields in different tables and report differences

Hi all,

I am struggling with the following, can't figure it out, sorry.

I have a non-Nav database used for ERP. In this database I have a Jobs table containing header-information for a planning/agenda item (similar to a Job Task i assume) and a BookedRes table containing the booked resources within the Job.

Example of a few fields in these tables:
- Jobs
+ JobKey (unique ID)
+ JobDate
+ JobClientKey
+ JobMProjKey (link to MainProjects table)
- BookedRes
+ BResKey (unique ID)
+ BResDate
+ BResJobKey (link to the Jobs Table, one jobs-record links to several bookedres-records)
+ BResClientKey
+ BResMProjKey

Due to bugs in the software there are sometimes differences between these tables in for example the values in the MPRojKey.

What I would like to do is get a NL("Rows"…) showing the BResKey for those records where the BResMProjKey is not equal to the JobMProjKey of the linked Jobs-record.

Can anyone show me how to do this? Or point me in the right direction?
Any help is appreciated, thanks in advance!!!!

Best regards,
Gerard

2 comments

Please sign in to leave a comment.