Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transfering data from one database to another
Message
From
11/03/2010 04:32:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01453866
Message ID:
01453869
Views:
58
>Hi
>
>I have two seperate applications with two databases.
>
>I've used wide field names for my tables in both, if I want to append records from one table in one of the databases to another table in the other database, and the structures are the same, will it transfer ok.
>
>I'm just concerned that sometimes when a table goes "outside the database" , all the extended features of the table are lost for example file names get truncated.
>
>Can I open the two databases at once?
>
>TAI

You can open them at once and you can transfer data from one to other. But is that something like a plain append from what you have in mind? Wouldn't be any problem in merging the data (like:

DB1 _ Table 1 _ have a record with Primary Key value X
DB2 _ Table 1 _ also have a record and the primary key value is X

however the data of those two records do not point to same data record. One belongs to company1 and the other company2. And probably they have 'child records in other tables'. I hope you get the scenario I am trying to say.

Otherwise wide and different names wouldn't be a problem you could use SQL effectively to do the insert/updates. ie: An insert sample that does insert with different field names:

* Assuming myTable1 with fields customerID, companyName, contactName exist
insert into myTable1 (customerID, companyName, contactName) ;
select cust_id, company, contact from (_Samples+'Data\Customer')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform