Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placing checks on the TransferSpreadsheet option

Status
Not open for further replies.

NeilPattison

IS-IT--Management
Aug 24, 2005
52
0
0
GB
I have a database table that is regularly updated from a spreadsheet, using the transferspreadsheet option in a macro and then using an append query.

So the spreadsheet is converted into a table called "temp" and then the append query adds it to the original access table.

In the tables the first column is a Unique Number and the second is a name. What I need to be able to do is confirm that the correct unique number is attached to the correct name before I use the append query.

How can I write a query that will check the Unique number and name in the "temp" table is matched with the correct info that is in the original table.

Any help would be greatly appreciated
 
Select uniquenum,nameField
from YouraccessTable
left join temp as num
on YouraccessTable.uniquenum=num.uniquenum
left join temp as names
on YouraccessTable.nameField=names.nameField
where YouraccessTable.num<>names.num
or YouraccessTable.nameField<>num.nameField

not tested

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top