I am working on bringing data in to a database from multiple sources, I have a particular set of tables - Header -> Details
The customer only wants to bring in Header records going back, say, 90 days.
So I have a date limiter on the header set
There is obviously a Parent ID that is contained in the Details table that connects the two one to many
So, on the next step, when I bring in details, I want to filter out any records for Parent IDs that do not exist in the Parent Table.
I am running the incoming records through a lookup that matches the ParentID in the detail tables to the existing ParentIDs in the Parent table and returns only matches, that is, only write records to the Detail table where the Parent exists
This filter does not work and all the records get passed and I end up with a FOREIGN KEY constraint failure on the Details table when I go to write the records. The only way I get it to work is to leave Check Constraints checked but ignore errors, but I don't think that is best practice.
I can post what I am doing, but I just cannot understand why the Lookup returns all records as matched when they are not, unless there is something simple I am missing
<style><br _moz_dirty="" /></style>DWM