[R] RMySQL - overwrite record, not table
whizvast
whizvast at gmail.com
Fri Aug 7 20:45:50 CEST 2009
Hi, useR-
In RMySQL, how do I overwrite records? (equivalent to "replace" query).
For example, suppose that dat2 is a newer data.frame than dat1.
con <- dbConnect(MySQL())
res <- dbWriteTable(con, "DBname", dat1, row.names=F, append=T, replace=T)
res <- dbWriteTable(con, "DBname", dat2, row.names=F, append=T, replace=T)
This would not update/replace the dat1 records in "DBname" with newer
records from dat2.
How would you solve the problem? Thanks=
--
View this message in context: http://www.nabble.com/RMySQL---overwrite-record%2C-not-table-tp24870097p24870097.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list