You can write all data (all rows) using sqlSave(channel, data, rownames = FALSE) , where channel <- odbcDriverConnect("Driver={SQL Server};Server=AAA;Uid=BBB;Pwd=CCC;") . This will create a table called data in your database.
Then you can add an existing sqlQuery(channel, 'insert into table select * from data') table sqlQuery(channel, 'insert into table select * from data') .
source share