Re: [PHP-DB] Query Across DBMS Boundaries (Linked Database Servers?)

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
Dee Ayy wrote:
> Is there something which can perform a query across different database systems?
> 
> It would extend the database.table.field notation to maybe
> dbms.database.table.field and allow queries across MySQL and MSSQL

I don't think so.

Both mysql and mssql would need to know how to parse that syntax and 
make it all work (besides other problems like database permissions, 
different connection strings and so on).

Depending on how much data you are looking to move from one to the 
other, you could get mssql to export to a csv file (if it supports it - 
no idea) then get mysql to import it. Either use the csv storage engine 
(http://dev.mysql.com/doc/refman/4.1/en/csv-storage-engine.html) or load 
it into another table using 'load data infile' 
(http://dev.mysql.com/doc/refman/4.1/en/load-data.html).

If you need to do it on the fly, my only other suggestion would be to 
set up two database connections - one for mssql and one for mysql and 
aggregate the data in php.

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.