Can either delete all rows from the input table or just a subset
by specifying a filter. If using a filter, recommended to test it
first using it as a filter in read_table_from_db()
. This ensures
your filter is working and not deleting rows unexpectedly.
Arguments
- server
Server instance where SQL Server database running.
- database
Database containing table with rows to delete.
- schema
Name of database schema containing table.
- table_name
Name of table with rows to delete.
- filter_stmt
Optional filter statement to delete only a subset of table rows where the filter is TRUE.
this should be a character expression in the format of a
dplyr::filter()
query, for example"Species == 'virginica'"
and it will be translated to SQL usingdbplyr::translate_sql()
. One way to achieve the right syntax for this argument is to pass adplyr::filter()
expression throughdeparse1(substitute())
, for example:deparse1(substitute(Species == "virginica"))
.