In Access I have a macro that, each night, takes a table with a
primary key defined in it, and deletes all the rows. Then it
imports/appends records from a fixed width text file. In this way,
since the table is not deleted and recreated, the primary key is kept
intact.
What would be the equivalent SQL method for doing this in an automated
way? I've tried letting DTS import the table from Access, but the
primary key is lost. Is there some way to "empty" a table instead of
dropping it, and then append new records so that the table will end up
having the primary key I want it to have?
Thanks.
Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
primary key defined in it, and deletes all the rows. Then it
imports/appends records from a fixed width text file. In this way,
since the table is not deleted and recreated, the primary key is kept
intact.
What would be the equivalent SQL method for doing this in an automated
way? I've tried letting DTS import the table from Access, but the
primary key is lost. Is there some way to "empty" a table instead of
dropping it, and then append new records so that the table will end up
having the primary key I want it to have?
Thanks.
Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
Comment