vikrant
2010-Dec-01 06:52 UTC
[R] Inserting multiple queries in sql server 2005 using RODBC in R
I am trying to insert multiple insert statements through R using RODBC. Initially Every time I am creating Insert statements and executing queries one by one.This takes lot of time since everytime the query is created and inserted. Is there any other way So that I can insert Multiple Insert statements in a single execution. I have tried Option for sqlSave, But in the parameters databasename is not mentioned. So it is trying to create table in a master database. But I need to create table and insert statement in mydatabase and table. How is it possible ? -- View this message in context: http://r.789695.n4.nabble.com/Inserting-multiple-queries-in-sql-server-2005-using-RODBC-in-R-tp3066744p3066744.html Sent from the R help mailing list archive at Nabble.com.
Dieter Menne
2010-Dec-01 07:48 UTC
[R] Inserting multiple queries in sql server 2005 using RODBC in R
-- View this message in context: http://r.789695.n4.nabble.com/Inserting-multiple-queries-in-sql-server-2005-using-RODBC-in-R-tp3066744p3066769.html Sent from the R help mailing list archive at Nabble.com.
Dieter Menne
2010-Dec-01 07:52 UTC
[R] Inserting multiple queries in sql server 2005 using RODBC in R
vikrant wrote:> > I am trying to insert multiple insert statements through R using RODBC. > Initially Every time I am creating Insert statements and executing queries > one by one.This takes lot of time since everytime the query is created and > inserted. Is there any other way So that I can insert Multiple Insert > statements in a single execution. I have tried Option for sqlSave, But in > the parameters databasename is not mentioned. So it is trying to create > table in a master database. But I need to create table and insert > statement in mydatabase and table. How is it possible ? >sqlSave with FAST=TRUE should do this. The problem that "the databasename is not mentioned" is valid for all operations, because you should assign the database name in odbcConnect. So if you copy from one database to the other, open two channels. Dieter -- View this message in context: http://r.789695.n4.nabble.com/Inserting-multiple-queries-in-sql-server-2005-using-RODBC-in-R-tp3066744p3066774.html Sent from the R help mailing list archive at Nabble.com.