SQLSearcher
asked on
SSIS Update records if exist insert new record if not
Hello Experts Exchange
I need to develop a SSIS package that will update a table if a record exists, if a record does not exist then insert the record.
However if a record does exits and only update the record if the field Verified is null and the field Populated = Y.
I think I need to use a Foreach Loop Container to be able to do this check on each record, but I don't know how to configure.
How would I configure the SSIS package to do this?
Regards
SQLSearcher
I need to develop a SSIS package that will update a table if a record exists, if a record does not exist then insert the record.
However if a record does exits and only update the record if the field Verified is null and the field Populated = Y.
I think I need to use a Foreach Loop Container to be able to do this check on each record, but I don't know how to configure.
How would I configure the SSIS package to do this?
Regards
SQLSearcher
ASKER
Hi Brian
Can you provide more detail please?
Regards
SQLSearcher
Can you provide more detail please?
Regards
SQLSearcher
Here is an image of part of a package that I use. It is performing a lookup on dimProject and sending all matched data to the Conditional Split which is pictured below in more detail. My example is comparing checksum values but you could easily change it to check your Verified and Populated values.
Hopefully this makes it a little clearer.
Hopefully this makes it a little clearer.
Some detailed instructions on how to use the Conditional Split task:
https://www.simple-talk.com/sql/ssis/ssis-basics-using-the-conditional-split/
https://www.simple-talk.com/sql/ssis/ssis-basics-using-the-conditional-split/
ASKER
Hello Brian
How do I setup the Update can you provide more information please?
Regards
SQLSearcher
How do I setup the Update can you provide more information please?
Regards
SQLSearcher
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your help.
If you need more detail on how to set these up let me know.