Updating 20k+ rows from Excel to access. vbscript? VBA? SQL?

C

Chris

Any suggestions?

Some of these rows only need a few columns updated, and others need
all of them updated. If possible if say row 800 column 'S' is filled
in the access DB but is blank on the excel spreadsheet, if possible i
like to keep the existing data in access and over right it with a
blank cell.

The spreadsheet is a export of the access DB, changes were made/merged
from other spreadsheets so the Unique ID is the same and in column A.

A script suggestions to complete this?

Thanks :)
 
D

DAVID

dim dbe
dim db
dim ssql

set dbe = createobj("dao.dbengine.36")

set db = dbe.opendatabase("mydatabase")

ssql = "UPDATE Table1 INNER JOIN
[Excel 5.0;HDR=NO;DATABASE=c:\wb3.xls].[RangeOrSheet]
ON Table1.id = Table2.id
SET Table1.nValue = [table2].[avalue];"

db.execute(SSQL)

You may have to use a .35 database (A97)
to get this to work.
 
T

Tom Wimpernads

dude you don't need to use DAO for anything

don't listen do kids that use DAO; they're stuck in the 80s




DAVID said:
dim dbe
dim db
dim ssql

set dbe = createobj("dao.dbengine.36")

set db = dbe.opendatabase("mydatabase")

ssql = "UPDATE Table1 INNER JOIN
[Excel 5.0;HDR=NO;DATABASE=c:\wb3.xls].[RangeOrSheet]
ON Table1.id = Table2.id
SET Table1.nValue = [table2].[avalue];"

db.execute(SSQL)

You may have to use a .35 database (A97)
to get this to work.

Any suggestions?

Some of these rows only need a few columns updated, and others need
all of them updated. If possible if say row 800 column 'S' is filled
in the access DB but is blank on the excel spreadsheet, if possible i
like to keep the existing data in access and over right it with a
blank cell.

The spreadsheet is a export of the access DB, changes were made/merged
from other spreadsheets so the Unique ID is the same and in column A.

A script suggestions to complete this?

Thanks :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top