sqlWriteTable: saves dataframe on SQL

Description Usage Arguments Details Value See Also Examples

View source: R/sqlWriteTable.R

Description

Writes, overwrite or appends a data frame to a database table. It calls dbWriteTable().

Usage

1
sqlWriteTable(server_name, data, table, ...)

Arguments

server_name

character, name of the DB server from sqlServers list.

data

a data frame or coercible to data frame

table

character, name of the table to write in DB.

bulk

boolean, in order to excecute in bulk mode or not (bulk does not use autoincrementals, but is faster)

...

other parameters passed on to methods.

Details

It ends the connection inmediately after getting the results. sqlServers is a list built-in sqlGetConn().

Value

returns booleans as it is specificated for dbWriteTable().

See Also

"sqlServerConn" and "setSqlServers()" documentation in toolkitEntel and "dbWriteTable()" from DBI for more details.

Examples

1
2
3
4
5
sqlWriteTable("local",head(iris),"iris")
sqlWriteTable("local",head(mtcars),"MTCARS")
con=sqlGetConn("local")
dbReadTable(con,"iris")
dbReadTable(con,"MTCARS")

danielfm123/dftools documentation built on July 17, 2021, 1 p.m.