El 30/01/10 08:26, Thomas Mueller escribió:
>
> > linked tables creation such as "pass-through"
>
> Why don't you connect to the target database directly?
Hi,
Connect to the other db , code for execute the remote query , iterate
over ResultSet and merge to a local table ;
it's all you must to do to make a direct import of a table in another
other DBM to a local table.
All this can be done with 2 sentence is H2 (local database) like :
CREATE LINKED TABLE
TLKT.EMP('com.microsoft.sqlserver.jdbc.SQLServerDriver',
'jdbc:sqlserver://nn.nn.nn.nn:1433', 'user', 'pass, 'EMP' ) READONLY ;
CREATE TABLE IF NOT EXISTS LOC.EMP AS ( SELECT * FROM TLKT.EMP );
At the end you have created a convenient table to receive data from the
external table, and populated with external data.
This is a very useful feature, Not only for the amount of work and code
saved,
but much more because this can be dynamically generated or scripted for
tables that you don't know in advance.
What if you need to repeat this over every table or view of a database
that has 100's or 1000's of tables ?
I think that is sufficient reason to desire a implementation of
LINKED_QUERY that don't have the limitations that linked tables has.
regards
Dario.
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.