1 Reply Latest reply on Jul 2, 2014 8:38 AM by philmodjunk

    Compare Records from Seperate Tables ? (Find uncommon)



      Compare Records from Seperate Tables ? (Find uncommon)


           I have a table called Inventory:

           Uniquely Identified by ItemCode (all records in this table are imporated from another DB called MAS)

           I have a table called Products:

           Where ModelNo has the relationship with ItemCode (as a unique identifier)

           [b]The issue[/b]

           I have some records that are listed in Inventory only, and do not show in Products

           How do I construct a script to find which ones are missing ?

           [b]For Example:[/b]

           Inventory:                Products:

           Model1                      Model1     
           Model2                      Model2
           Model3                      Model4

           How do I pick up the "Model3"

           I wrote a script that loops through all the records in the Inventory Table and if they = ModelNo from Products, Do nothing, Else, it writes that ItemCode to a email.

           It worked for 1 Model Number but still a handful that it did not detect.


        • 1. Re: Compare Records from Seperate Tables ? (Find uncommon)

               On an inventory layout, place the Products::itemCode field

               enter find mode.

               put an asterisk into the Products::itemCode field

               Click the Omit button in the status toolbar so that you are finding inventory records that do not show any data in the related itemcode field.

               Perform the find.

               These same steps can be scripted. With a script, it is not necessary to place the itemCode field on this layout in order to get this to work. (But it is useful as a way to confirm that the find worked as expected.)