View Single Post

   
  #5 (permalink)  
Old 02-29-2008, 07:49 AM
Stu
 
Posts: n/a
Default Re: SQL UPDATE Database from Excel Table

It doesn't sound as if you are doing an UPDATE, but rather a "replace
all the contents" move. An UPDATE statement assumes that you have
matching data between your source and targets, and can link to change
the vaules of that data. It sounds as if you just want to delete the
data, and start over.

You have a couple of options, but they will differ between Access and
SQL Server. SQL Server will allow you to issue multiple SQL statements
in a single transaction by using the .; seperator. I don't believe
that Access will.

In either case, you could either DROP the table, and then recreate it
using the SELECT...INTO syntax, or simply DELETE the data, and INSERT
the new data. Your choice may depend on what rights you have, how much
data there is, whether there are indexes on the table, etc...

Just offering some ideas.

Reply With Quote