build_update_statements: Function to build SQL 'UPDATE' statements from an input data...

View source: R/build_update_statements.R

build_update_statementsR Documentation

Function to build SQL UPDATE statements from an input data frame.

Description

Function to build SQL UPDATE statements from an input data frame.

Usage

build_update_statements(table, df, where = NA, squish = FALSE)

Arguments

table

Database's table to update.

df

Input data frame to generate UPDATE statements with.

where

Which variables in df to be used for the WHERE clause. If not used, only a single row data frame can be used.

squish

Should white space around commas and equal signs be removed to make the SQL statement shorter?

Value

Character vector with a length of nrow(df).

Author(s)

Stuart K. Grange


skgrange/databaser documentation built on Sept. 26, 2024, 8:30 p.m.