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 |
|
jpotucek
Constraint Violating Yak Guru
273 Posts |
Posted - 2004-09-24 : 07:55:29
|
| I need to REPLACE pricing catalog data in a table - which is easy enough for me to do with DTS from the flat file they gave me, but I need to know what is the easiest way to perserve my existing table data so I can roll the change out easily? I thought I could make a 'copy' of my existing table, but I can't figure out how to do that. |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2004-09-24 : 08:08:40
|
| To make a copy of the table I suggest to use BCP out, it is the fastest way too.Instead I suggest to have some key value on the table to know what are the rows inserted!. Say an identity column, note the value before and after the dts process and you can verify the no of rows inserted.- Sekar |
 |
|
|
jpotucek
Constraint Violating Yak Guru
273 Posts |
Posted - 2004-09-24 : 08:10:09
|
| Thank you |
 |
|
|
jpotucek
Constraint Violating Yak Guru
273 Posts |
Posted - 2004-09-24 : 15:04:29
|
| actually, I'm not appending data, I'm replacing Data. Thank you for your input!!!! I think what I'll do is a select * into NEW_TABLE from OLD_TABLE to make a copy of the table before I use DTS to import my flat file. |
 |
|
|
jpotucek
Constraint Violating Yak Guru
273 Posts |
Posted - 2004-09-30 : 07:19:15
|
| another dumb question........I have the need to REPLACE data in an exiting table with data from a flat file. my problem is a primary key (I think)what I am doing is renaming my existing production table (to save it) and then importing the data from that renamed table back into it's original name to recreate the table before I insert new data. My problem is when I export from my renamed table into a new table, I lose my primary key value. Can I just reset the primary key on the new table? Not sure what I'm doing wrong.. |
 |
|
|
|
|
|