Queries on tables from different data sources

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I need to perform two queries in sequence on two identical access tables.
The source table is coming from a dataset returned by a web method and the
destination table is from a local access table. The queries are;

UPDATE [destTbl] INNER JOIN srcTbl ON [destTbl].entry_id = srcTbl.entry_id
SET [destTbl].field1 = [srcTbl].[field1], [destTbl].field2 =
[srcTbl].[field2];

and

INSERT INTO [destTbl] (field1, field2)
SELECT srcTbl.field1, srcTbl.field2
FROM srcTbl
WHERE (((srcTbl.entry_id) Not In (SELECT srcTbl.entry_id FROM [destTbl])));

I have two problems. a) What code do I need to tell the query that srcTble
is from the web method. b) There seem to be two connections; a web
connection and a local connection. What connection should I use to execute
the query?

If I have totally misunderstood how to carry this out then please let me
know.

Thanks

Regards
 
I'm not sure if I've understood you. A View is not a Recordset.
SQL is for querying Views not for querying Recordsets.

Have you managed to get the data from the web into a named
database with a named view?

It doesn't really matter what you connect to: connections
are there to handle permissions. Using any connection you
should be able to refer to any database. You may have to
use additional information in the SQL to specify the
database engine - server - database as well as the normal
table - field.
 
Back
Top