[R] Help: sqlSave Error

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Thu Nov 10 18:20:06 CET 2011

The error seems clear enough to me... sqlSave is trying to create the table but it already exists.

Some possible directions you could take:

1) Do your work on a particular instance of the table within a single transaction and rollback at the end.
2) Delete the table before you run sqlSave.
3) Explicitly create the table once and keep it, deleting data before re-using it, and use the append option.
4) Include a column that distinguishes between different blocks of data and keep all of the data you add to it.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

bruclee <brouce33 at gmail.com> wrote:

>I am using sqlSave to save my data into an existing table at MS SQL
>database. Previously my code ran smoothly but all of a sudden it
>working. Here is my code:
>sqlSave(con, highVol, "dbo.futuresHighVol", append=TRUE,
>Error: sqlSave(con, highVol, "jrgchis.dbo.futuresHighVol", append =
>TRUE,  : 
>  42S01 2714 [Microsoft][ODBC SQL Server Driver][SQL Server]
>'futuresHighVol' already exist
>jrgchis.dbo.futuresHighVol  ("TradeTime" varchar(255), "vol" float)'
>Please Help!!!
>View this message in context:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list