Hot Topic (More than 10 Replies) How to...move one database into another (Read 1632 times)
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
How to...move one database into another
Sep 12th, 2006 at 6:16pm
Print Post Print Post  
We have two databases that contain some duplicate data.  One has about 250 fields, the other about 150.  Approximately 50 fields are the same in each.

Is there a way to move or copy the fields from the "smaller" application into the larger one. 

The merge function does not provide exactly what we need as we do not want to have two distinct data base entities but a single database.

As always all help is very much appreciated.

Cliff
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: How to...move one database into another
Reply #1 - Sep 13th, 2006 at 12:05am
Print Post Print Post  
Amongst the "duplicate data" are there any fields whose value can link the data in one form from database A with the matching record in database B?

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: How to...move one database into another
Reply #2 - Sep 15th, 2006 at 5:47pm
Print Post Print Post  
Yes...out of perhaphs 200 fields there are about 20 fields that are duplicated between the two databases.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: How to...move one database into another
Reply #3 - Sep 15th, 2006 at 7:47pm
Print Post Print Post  
Do any of the 20 or so have values that could be used to join the two records into one? In other words, can they act as a "key" value?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: How to...move one database into another
Reply #4 - Sep 20th, 2006 at 5:03pm
Print Post Print Post  
Yes...there are several fields (records) that could be used as key values....
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: How to...move one database into another
Reply #5 - Sep 20th, 2006 at 6:34pm
Print Post Print Post  
Is the value in any of those elements the same in both the records in question and definitely unique in that no other records but those two will have that value in that element?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: How to...move one database into another
Reply #6 - Sep 26th, 2006 at 4:52pm
Print Post Print Post  
Yes...if I understand the question correctly both databases utilize the same information in the same fields as follows:

Policy number, Suffix number, Effective date, Expiration date, Insured name, Transaction type, Address, City, State, Zip, and Bussiness form.

These fields are identical between the two databases...

By the way...the delay in responses is due to our visits at the client site at 1 to 2 days a week.

Thanks again...

Cliff
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: How to...move one database into another
Reply #7 - Sep 26th, 2006 at 6:02pm
Print Post Print Post  
The simplest thing you can do is merge the two databases/forms into a single application. Then edit the larger existing form, adding the additional elements from the smaller form (should be about 100). Reorganize and relabel the elements already on that form as needed. To make additional room, click on the form's surface and press the Shift-Arrow keys. You can use the rubberband select to move larger groups of elements out of the way.

Once you have your enlarged form built, I would recommend using a @XLookupSourceList in a Mass Update (using the value of a shared element with a shared unique value as the key), and the String Array commands to populate the additional elements from the smaller form. Once that is complete (and very verified), you can trim the database for the smaller form out of the application.

A more complicated solution, though it is less manual labor, is to make the smaller form a relational subform of the larger form that is not allowed to advance (using NotifyForm). This will effectively make it a "part" of the main form because it can only save the first record and cannot advance to the second record. This is not a very elegant solution - though it is a lot less work. I haven't tried to built an app that works this way, so the advice is untested.

If you do decide to go the second route, you should do an ASCII export of the result and then clear the application of user data, set subform to be naturally linked and read the ASCII data back in. That way you will not take a speed hit for being relational when you don't really need to be.

In any case, you will need to remove the "shared" elements from the resultant form, so that your form does not have duplicate elements and to reduce general confusion.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: How to...move one database into another
Reply #8 - Sep 26th, 2006 at 6:49pm
Print Post Print Post  
Hi Mark:

Thank you kindly for taking the time to assist me with this.  I will try the "elegant" solution that you have layed out for me. 

Again...

Thanks...

Cliff
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: How to...move one database into another
Reply #9 - Sep 26th, 2006 at 8:14pm
Print Post Print Post  
You're welcome. Let us know how it goes or if there any specifics we can assist you with.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: How to...move one database into another
Reply #10 - Sep 26th, 2006 at 8:42pm
Print Post Print Post  
Super!  Very much appreciated...

Cliff
  
Back to top
 
IP Logged