Import Column; matching rows

B

Bill Rowland

I need to import data from Excel or another Access table (does not matter
which). I need to match up data from column C with new column. When column
B has 12345 entry and I need to import 54321 in the same row but in column C.
This is for cross ref of one part number to an internal part number. Table
with one part number needs to have another table containing cross ref part
number imported and still match up rows.

Example:

Column B Column C
12345 54321
 
J

John Nurick

Hi Bill,

If 12345 goes with 54321, what are the rules for deciding what goes with
99999, or 11231, or any other number?
 
B

Bill Rowland

I want to search each row in column B (original file) for an entry, then
search second file for that same number in Column B,C or what column then
copy what is in column C in original file to column C on second file.
 
J

John Nurick

I want to search each row in column B (original file) for an entry, then
search second file for that same number in Column B,C or what column then
copy what is in column C in original file to column C on second file.

This seems to mean that starting with (for example)

tblOriginal
A, B, C, D
1, 54321, 1000, "Something"
2, 77652, 2000, "Other data"
3, 54562, 3000, "Yet more"
and

tblTwo
A, B, C, D, E
1, 10234, 54321, 99200, 32354
2, 54397, 30999, 54562, 54989
3, 83000, 39987, 87654, 77652

you want to get

tblTwo (after operation)
A, B, C, D, E
1, 10234, 1000, 99200, 32354
2, 54397, 3000, 54562, 54989
3, 83000, 2000, 87654, 77652

Is that right?
 
M

Marcin

U¿ytkownik "Bill Rowland said:
I need to import data from Excel or another Access table (does not matter
which). I need to match up data from column C with new column. When column
B has 12345 entry and I need to import 54321 in the same row but in column C.
This is for cross ref of one part number to an internal part number. Table
with one part number needs to have another table containing cross ref part
number imported and still match up rows.

Example:

Column B Column C
12345 54321





===========================================================================
FULL LEGAL SOFTWARE !!!
Games, video, program, image, chat, questbook, catalog site, arts, news,
and...
This site it is full register and legal software !!!
Please download and you must register software !!!

PLEASE REGISTER SOFTWARE:
http://www.webteam.gsi.pl/rejestracja.htm
DOWNLOAD LEGAL SOFTWARE:
http://www.webteam.gsi.pl

Full question and post: http://www.webteam.gsi.pl

Contact and service and advanced technology:
http://www.webteam.gsi.pl/kontakt.htm
FAQ: http://www.webteam.gsi.pl/naj_czesciej_zadawane_pytania.htm

Please add me URL for you all site and search engines and best friends !!!

Me site:
SERWIS WEBNETI: http://www.webneti.gsi.pl
PORTAL WEBTEAM:http://www.webteam.gsi.pl
LANGUAGE: http://www.webneti.cjb.net

==========================================================================
 
B

Bill Rowland

--
Bill Rowland MCSA MCSE 2000



Is this the only information sent (Name and Please respond...) I am using
the Newsgroup to respond.
 
J

John Nurick

Sorry, I pressed the wrong button earier. Here's what I meant to say:

As far as I know you'll need to use a succession of update queries, one
for each of the columns in tblTwo that you want to "search". Probably
it's simplest to import the data into Access rather than trying to work
in Excel.

The first query will be like this:

UPDATE tblOriginal INNER JOIN tblTwo
ON tblOriginal.B = tblTwo.C
SET tblTwo.C = tblOriginal.C;

This one has to be executed first. All the queries compare column B in
tblOriginal to one column in tblTwo and update column C of tblTwo. So
must start with the query that compares tblOriginal.B to tblTwo.C so it
can work on the original values in tblTwo.C before they have been
changed by one of the other queries.

The remaining queries are the same apart from referencing different
columns in tblTwo:

UPDATE tblOriginal INNER JOIN tblTwo
ON tblOriginal.B = tblTwo.XXX
SET tblTwo.C = tblOriginal.C;

where XXX is replaced by B, D, and E.
 

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