I have a CSV file which I need to load into a SQL database. The issue is, that i need to split some Data into different tables. During the load I need to make sure, that when the first part is loaded into the first table I get that ID which will be put into the foreign key field in the second table when I try to load the other data in the database.
How do I load the data into multiple tables with the data coming from CSV file by maintaining the data integrity?