开发者

Query two databases in Monetdb

开发者 https://www.devze.com 2023-04-13 08:22 出处:网络
Im using monetdb and i have two databases on it \"mydb\" and \"test\". I want to get a sub开发者_开发知识库-set of values from \'mydb\' into \'test\'.

Im using monetdb and i have two databases on it "mydb" and "test".

I want to get a sub开发者_开发知识库-set of values from 'mydb' into 'test'.

My code:

 insert into test.result 
select sum(chargfeeprepaid) from mydb.data where callingpartyno = 628388881507 
union 
select sum(chargefeeprepaid) from mydb.sms where callingpartyno = 628388881507;

This works fine in MySQL...but in Monetdb i get the error: INSERT INTO: no such scheme 'test'.

Where did i go wrong and what is the correct syntax to do this in monetdb?

Greetings Seleen


There is no way to do this in MonetDB. Every Database is served by it's own process (mserver) and there is no sharing between them.

If you want to migrate data from one database to another you have to either copy the data using the copy commands (see http://goo.gl/OXkto) or dump the data as sql inserts using the dump commands ( http://goo.gl/5Bfrf and http://goo.gl/EuPwE).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号