[MonetDB-users] Insert query into second database
Hello, I have two databases "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 = 200 union select sum(chargefeeprepaid) from mydb.sms where callingpartyno = 300;" 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 -- View this message in context: http://old.nabble.com/Insert-query-into-second-database-tp32667556p32667556.... Sent from the monetdb-users mailing list archive at Nabble.com.
On 17-10-2011 07:22:06 -0700, Seleen wrote:
Hello, I have two databases "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 = 200 union select sum(chargefeeprepaid) from mydb.sms where callingpartyno = 300;"
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?
You cannot do this with MonetDB. Databases are separate parts that have no connection to each other. You better use different schemas to do this, if you don't have resource-wise constraints on the separation of both tables mydb and test.
participants (2)
-
Fabian Groffen
-
Seleen