Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Inserting records into multiple tables via a staging table - best approach

$
0
0

Hi all

I have been tasked with uploading data from a CSV file into our database system.  Trouble is that the data that is in the CSV needs to be stored in different tables.  This CSV also contains repeated data for each unique identifier - except for a few fields at the end of each record.

For example....

IDName DateClaimTypeCash

1Mr X 01/01/2012TP 100

1Mr X 01/01/2012AC 200

2Mr Y 01/02/2012TP 150

2Mr Y 01/02/2012TP 170

3Mr Z 01/03/2012TP 200

The columns ID, Name, and Date will need to be inserted into one table (grouped on ID so no duplicate entries) and the ClaimType and Cash values will need to go into another table, linked to the first table via the ID column.

I have been thinking about using SPs and SSIS to achieve this but cannot decide on which way to go.  And even if I did choose, I wouldn't have a clue how to incorporate such a function!

Can anyone give me some pointers on how to proceed with this please?

Many thanks - any questions, please let me know.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>