prepInsertSQL: A Function to Generate a List of SQL statements from...

Description Usage Arguments Details Examples

View source: R/prepInsertSQL.R

Description

prepInsertSQL returns a list of insert SQL statements

Usage

1
prepInsertSQL(tableName = "", df = NULL, quote = NULL)

Arguments

tableName

a table name

df

dataframe that provides data

quote

(Optional) it is a vector indicates whether a data element should be quoted or not. 1 means quoted while 0 means not.

Details

The function is to generate insert SQL statements with data.frame data

Examples

1
2
3
4
5
## Not run: 
   testData=data.frame(name=c("peter","john"), age=c(18,23))
   sqlStatement=prepInsertSQL(tableName="student", testData, quote=c(1,0))

## End(Not run)

hkex.api documentation built on May 29, 2017, 11:56 a.m.