Appending records

  • Thread starter Thread starter Bill Davis
  • Start date Start date
B

Bill Davis

I have a column of data that was pulled from another
database and would like to add this data to a existing
database.. I have a dump of data that has (Database 1)
[trackingid],[circuitid] (Database 2)[circuitid],
[trackingid],[customeracct],[customername],[comment]. I
want to append the [trackingid] from (Database 1) into
(Database 2) where the [circuitid] matches. I hope
someone can help me, if I was not clear I will try and
explain better..
 
Not making a whole lot of sense, first blush, Bill.

If you are *appending* where the fields match then you are asking it to add
the records, effectively duplicating, no?

However, if you want to *update* Database2 by adding into the matching
records, the trackingID field,and you have the field in there to do it, then
its easy.

Pop this into Access to see if it makes sense:

UPDATE Database1 INNER JOIN Database2 ON Database1.CircuitID =
Database2.CircuitID SET Database2.TrackingID = Database1.TrackingID;

Which translated means: EDIT, on the field where the two databases match,
SETTING the TrackingId in Database2 to the same as the TrackingID field in
Database1.

Cheers
Sean
 
Sean,
I am glad that you were able to understand what I was
asking, it worked fine..
Thank you!!
Bill
-----Original Message-----
Not making a whole lot of sense, first blush, Bill.

If you are *appending* where the fields match then you are asking it to add
the records, effectively duplicating, no?

However, if you want to *update* Database2 by adding into the matching
records, the trackingID field,and you have the field in there to do it, then
its easy.

Pop this into Access to see if it makes sense:

UPDATE Database1 INNER JOIN Database2 ON Database1.CircuitID =
Database2.CircuitID SET Database2.TrackingID = Database1.TrackingID;

Which translated means: EDIT, on the field where the two databases match,
SETTING the TrackingId in Database2 to the same as the TrackingID field in
Database1.

Cheers
Sean


I have a column of data that was pulled from another
database and would like to add this data to a existing
database.. I have a dump of data that has (Database 1)
[trackingid],[circuitid] (Database 2)[circuitid],
[trackingid],[customeracct],[customername],[comment]. I
want to append the [trackingid] from (Database 1) into
(Database 2) where the [circuitid] matches. I hope
someone can help me, if I was not clear I will try and
explain better..


.
 
No probs, chat soon.
Sean
Bill said:
Sean,
I am glad that you were able to understand what I was
asking, it worked fine..
Thank you!!
Bill
-----Original Message-----
Not making a whole lot of sense, first blush, Bill.

If you are *appending* where the fields match then you are asking it to add
the records, effectively duplicating, no?

However, if you want to *update* Database2 by adding into the matching
records, the trackingID field,and you have the field in there to do it, then
its easy.

Pop this into Access to see if it makes sense:

UPDATE Database1 INNER JOIN Database2 ON Database1.CircuitID =
Database2.CircuitID SET Database2.TrackingID = Database1.TrackingID;

Which translated means: EDIT, on the field where the two databases match,
SETTING the TrackingId in Database2 to the same as the TrackingID field in
Database1.

Cheers
Sean


I have a column of data that was pulled from another
database and would like to add this data to a existing
database.. I have a dump of data that has (Database 1)
[trackingid],[circuitid] (Database 2)[circuitid],
[trackingid],[customeracct],[customername],[comment]. I
want to append the [trackingid] from (Database 1) into
(Database 2) where the [circuitid] matches. I hope
someone can help me, if I was not clear I will try and
explain better..


.
 
Back
Top