Q

Updating a table with a text file

I am a complete newbie in SQL Server 2000, and I would like to start by putting my applications Access mdb in adp by using SQL 2000. My first exercise was to import a .txt file in SQL. This text file is updated every day. I would like to know how to update my table most effectively: is it necessary to remove all the recordings with TRUNCATE and to import the new ones, or are there a series of orders which enable me to make an update of the changed recordings and to add the new ones? My question will undoubtedly seem you very simple.... be lenient: I debute.

Unfortunately, you would have to dump the entire table and then reimport the data. Since you are maintaining a

text file, it doesn't have any capability to log the changes that were made so that you could apply just those changes. The easiest way would be to just truncate your table in SQL Server and then use BCP to reimport your text file.

 

For More Information

This was first published in April 2002

Dig deeper on Microsoft SQL Server Installation

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close