As I understand the request: You want to take the data from D1.T1 and migrate in bulk to D2.T2. If that is the case then you may find the following SQL helpful:
(I am a SQL Server programmer but I believe the code is ANSI-92 compliant)
For updating Existing Data based on Key Match:
UPDATE D2.T2
SET Field1 = t1.field1, Field2 = t1.Field2, etc...
FROM D1.T1
WHERE D1.T1.KeyField = D2.T2.KeyField
Inserting New Data:
INSERT INTO D2.T2(Field1, Field2, ...)
SELECT Field1, Field2, ...
FROM D1.T1
** If Progress supports the INSERT INTO shorthand then you may do so, it woun't affect the results, minding that the ordinal position of fields MUST MATCH 100% for the shorthand to work.
** I dropped the 'dbo' as I would have used in SQL Server as you do not have that in your sample information.
Main Topics
Browse All Topics





by: JohnBPricePosted on 2007-09-17 at 09:25:26ID: 19906146
I believe the only way that will work is if Progess supports it. For example, in SQL Server, you can register remote servers (including standard ODBC databases), and then SQL server will coordinate the data across servers (it is horribly slow however).
ADO itself will not do it, since a SQL statement runs on a single connection to a single DB provider.