Create SQL Tuples from Data Frame
Examples
x <- data.frame(
name = c("Peter", "Paul"),
birthday = as.POSIXct(c("1981-12-13", "2003-01-16"))
)
setCurrentSqlDialect("msaccess")
dataFrameToSqlTuples(x)
#> [1] "('Peter',#1981-12-13#)" "('Paul',#2003-01-16#)"
# Note that the representation of a date and time is different in MySQL
setCurrentSqlDialect("mysql")
dataFrameToSqlTuples(x)
#> [1] "(\"Peter\",'1981-12-13')" "(\"Paul\",'2003-01-16')"