Hi All,

            I am pretty new for RODBC. I want to save my table to a DB, so I 
used something like

sqlSave(db, a, 'Forecast_Result', rownames = FALSE);

But I got an error
Error in sqlSave(db, a, "Forecast_Result", rownames = FALSE) :
  table 'Forecast_Result' already exists

Yes, that table has been created before. But I need to overwrite the content in 
that table now. Obviously, I should use sqlUpdate. But sqlUpdate is to update 
existing table. So it seems to me I should use sqlSave first time when the 
table is not there and then use sqlUpdate for further update. How to test if 
the table is already there or not?  Or, if there is a simpler logic to solve my 
problem, please advise me.

Many thanks.

HXD

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to