![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a database that I normalized to 3N. Now I have a large amount of data from a 3rd party that is in a flat file that I wish to bring into the normalized (but empty) database. If I simply needed to split the data up into the appropriate tables, I can see to build multiple inserts using a temp table. What I cannot figure out is how to create my 1-to-many relationships as I do the inserts. I've read several posts on this topic, but none that really give any specific guidance. Any advice? |
#3
| |||
| |||
|
|
OK so what I would do is this Import the file into a working table of the same structure Import the Parent attributes to the real table(s) Import the child attributes. You will need to join back onto the working table. This will involve making multiple passes over the same data. -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Earl" <brikshoe (AT) newsgroups (DOT) nospam> wrote in message news:%23wmZjxhxEHA.260 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I have a database that I normalized to 3N. Now I have a large amount of data from a 3rd party that is in a flat file that I wish to bring into the normalized (but empty) database. If I simply needed to split the data up into the appropriate tables, I can see to build multiple inserts using a temp table. What I cannot figure out is how to create my 1-to-many relationships as I do the inserts. I've read several posts on this topic, but none that really give any specific guidance. Any advice? |
#4
| |||
| |||
|
|
OK so what I would do is this Import the file into a working table of the same structure Import the Parent attributes to the real table(s) Import the child attributes. You will need to join back onto the working table. This will involve making multiple passes over the same data. -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Earl" <brikshoe (AT) newsgroups (DOT) nospam> wrote in message news:%23wmZjxhxEHA.260 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I have a database that I normalized to 3N. Now I have a large amount of data from a 3rd party that is in a flat file that I wish to bring into the normalized (but empty) database. If I simply needed to split the data up into the appropriate tables, I can see to build multiple inserts using a temp table. What I cannot figure out is how to create my 1-to-many relationships as I do the inserts. I've read several posts on this topic, but none that really give any specific guidance. Any advice? |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |