Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

prepInsertSQL

A Function to Generate a List of SQL statements from Dataframe.


Description

prepInsertSQL returns a list of insert SQL statements

Usage

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

## 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

API to Retrieve Data from Hong Kong Stock Exchange

v0.1
GPL-3
Authors
Kimman Lui [aut, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.