ms_qsg_fromdf: dataframe or tibble to MSSQL insert query string

Description Usage Arguments Value Examples

Description

dataframe or tibble to MSSQL insert query string

Usage

1
2
ms_qsg_fromdf(dT, tablename, iLength = 900, tz = Sys.timezone(),
  Colnames = FALSE)

Arguments

dT,

a tibble

tablename,

table name

iLength,

max insert rows in batch mode, default = 900

tz,

timezone

Colnames,

boolean whether include colnames inside query string, default = FALSE

Value

a tibble of a segmented insert query string

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
  ms_qsg_fromdf(iris[1:3, ], 'testdb..iris')
  ms_qsg_fromdf(iris[1:3, ], 'testdb.dbo.iris', iLength=1) 
  require(tibble) 
  ms_qsg_fromdf(tibble(c1=Sys.Date()), 'tmp', tz='US/Eastern') 
  ms_qsg_fromdf(iris[1:3, ], 'iris', Colnames=TRUE) 
  ms_qsg_fromdf(iris[1:3, ], '[testdp].dbo.[iris]') 

## End(Not run)

obarisk/sqltools documentation built on May 24, 2019, 11:52 a.m.