![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need to take one CSV file and import it into multiple tables in a database. What I'm not sure of how to do is specify which table the data |
|
Thanks, Brian |
#3
| |||
| |||
|
|
I'm not a SQL guru, so I'll try to explain a little better. I have one CSV file with information for example a wholesale customer and a retail |
|
Thanks for your time (and sorry for the multiple posts, the site gave and error that it did not post and to try again) O-well... Brian "Allan Mitchell" wrote: Number of ways to do this. Is this a Master: etail import but thedetails are all in one file and you want to split it? Personally I would 1. Import the file into a staging table as is. 2. Run over the data and import the master rows 2. Run over the data again and join the Master table to our staging table and import the detail rows. You can do this in one pass using lookups but you will suffer on performance -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "BMoritz" <BMoritz (AT) discussions (DOT) microsoft.com> wrote in message news:92DA7A78-E45B-4537-8B49-0B5D4BB94252 (AT) microsoft (DOT) com... I need to take one CSV file and import it into multiple tables in a database. What I'm not sure of how to do is specify which table the data should go into. I have successfully imported into one, but not sure how to do multiple tables. Just a point in a general direction or documentation would be helpful! Thanks, Brian |
![]() |
| Thread Tools | |
| Display Modes | |
| |