Jump to content
Server Maintenance This Week. ×

Importing fields from one DB to another


Scott_R

This topic is 3509 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have two databases, call them Full and Subset.

Without getting into complicated and unimportant background explanations, when it was created Subset had been simply export of part of part of Full--i.e. I did a Find to isolate certain records I needed (about half of Full), exported the results as another database, then trimmed down the fields, going from 33 down to four, adding one additional field that Full does not have.

In short, I trimmed a couple of fields too many. I need to add back two more fields that are still in Full but were removed (months ago) from Subset. I can't simply replicate creating Subset: there are a lot of records since added to Full that I don't want in Subset (and can't isolate by filtering Full) and records removed from Subset that remain in full.

The only way to get what I need is to import the two fields from Full into Subset, making sure that I only import the contents of matching records. To make sure it's accurate, I think I need to match three fields in each--the three fields that both databases still share. That is:

FULL............................................................... SUBSET

Record 1..........................................................Record 1

Field 1--------------------matches------------------->Field 1

Field 2--------------------matches------------------->Field 2

Field 3--------------------matches------------------->Field 3

Field 4

Field 5

Field 6--------------------import--------------------->Field 4 (new to Subset)

Field 7--------------------import--------------------->Field 5 (new to Subset)

Field 8

 

Of course, that's only if the records on Full and Subset match; if Record 2 exists in Full but not in Subset, nothing happens. A complication, as I see it, is that the matches won't be consecutive. Even sorted, the first records in each database might match, but then record 6 in Full might match record 2 of Subset.

 

Any thoughts? Any clarifications I need to make in the question?

Link to comment
Share on other sites

@ggt667 It sounds like he specifically does NOT want to add remaining records.

 

Scott, when you use matching fields, the order of the records has no effect. But it's important that the field or fields you use provide a unique key.

 

Did you not export a unique ID that you can use to match?

Link to comment
Share on other sites

This topic is 3509 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.