Description Usage Arguments Details Value
Write the data.frame to MySQL database using the method that sent the query to the database server.
1 2 3 4 |
data |
the data.frame will be written to the database |
channel |
an ODBC channel object |
table |
the table name of database, which is used to organized query |
quiet |
logical, default is TRUE, show the progress bar |
sql.out |
logical, whether give the SQL message, just in case there are errors occur |
delete.first |
logical, whether to delete the records first using the primary key column |
primary |
integer, which column is the primary column, and just used when delete records |
sql.file |
the file name of the output sql file |
append |
pass to the |
The function can delete the records before writing to the database, however if it can be make sure that the there is no duplicated records, the deletion can be skipped, saving time. The deletion work is based on the primary key, so the column index has to be given, and the column name should the same as that in the database.
The mechanism of the function is to paste an INSERT query and send to the database server. Sum method seems safe to be executed.
The function writeToSQL
just save the query to the .sql
file,
which can be used to import to the database manually, however, this is a
good choice for the big data set.
Besides errors messages, no return.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.