Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jmarte
Starting Member
1 Post |
Posted - 2007-04-27 : 15:58:09
|
| Hi there!!! Trying to figure something out, I have searched this forum but no answer to my dilemma.I have three tables on a database that I have to insert new data and update the old one. The structure of the tables is like this:Table1custid int primary key,identityfname varchar(30)lname varchar(30)Table2fileid int primary key, identityssn varchar(11)custid int foreign keyTable3statusid int primary key,identitytitle varchar(18)fileid int foreign keyThis is very general but that's the idea. Now I receive a text file with the necessary info, I've already parse and break down the file into the correct fields.Now for my question, how I insert the relevant data onto the tables from this one parsed file? and also how I go about inserting the primary keys from the different tables onto the foreign keys of each tables?I tried relationships and key indexes, but it just spew a bunch of errors, that I'm investigating.Any ideas, pointers, tuts, something I'm missing?BTW I'm using sql 2005 express and VB.netThanks in advance for any help._José |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-04-27 : 16:43:54
|
| Try load data into staging table, then move them to target tables with your logical. |
 |
|
|
|
|
|