Learn R Programming

TSsql (version 2017.4-1)

standardSQL: Standard SQL Database Queries

Description

Standard SQL database queries

Usage

TSgetSQL(serIDs, con, TSrepresentation=getOption("TSrepresentation"),
       tf = NULL, start = tfstart(tf), end = tfend(tf), names=NULL, 
       TSdescription=FALSE, TSdoc=FALSE, TSlabel=FALSE, TSsource=TRUE,
       vintage=getOption("TSvintage"), panel=getOption("TSpanel"))

TSdatesSQL(serIDs, con, vintage=getOption("TSvintage"), panel=getOption("TSpanel")) TSdeleteSQL(serIDs, con=getOption("TSconnection"), vintage=getOption("TSvintage"), panel=getOption("TSpanel")) TSdescriptionSQL(x=NULL, con=getOption("TSconnection"), vintage=getOption("TSvintage"), panel=getOption("TSpanel"), lang=getOption("TSlang")) TSdocSQL(x=NULL, con=getOption("TSconnection"), vintage=getOption("TSvintage"), panel=getOption("TSpanel"), lang=getOption("TSlang")) TSlabelSQL(x=NULL, con=getOption("TSconnection"), vintage=getOption("TSvintage"), panel=getOption("TSpanel"), lang=getOption("TSlang")) TSsourceSQL(x=NULL, con=getOption("TSconnection"), vintage=getOption("TSvintage"), panel=getOption("TSpanel"), lang=getOption("TSlang"))

TSputSQL(x, serIDs=seriesNames(x), con, Table=NULL, TSdescription.=TSdescription(x), TSdoc.=TSdoc(x), TSlabel.=TSlabel(x), TSsource.=TSsource(x), vintage=getOption("TSvintage"), panel=getOption("TSpanel"))

Arguments

con
A database connection.
serIDs
identifiers for series to extract.
TSrepresentation
time series representation to use for the result.
x
time series data, or serIDs.
names
Optional character vector to use for series names.
tf
Optional tframe to use for truncating data. (See tfwindow.)
start
Optional start date to use for truncating data. (See tfwindow.)
end
Optional end date to use for truncating data. (See tfwindow.)
TSdescription
TRUE or FALSE indicating whether description should be extracted
TSdescription.
Description to put on the database.
TSdoc
TRUE or FALSE indicating whether documentation should be extracted.
TSdoc.
Documentation to put on the database.
TSlabel
TRUE or FALSE indicating whether documentation should be extracted.
TSlabel.
Documentation to put on the database.
TSsource
TRUE or FALSE indicating whether source indication should be extracted.
TSsource.
Source indication to put on the database.
Table
Database table indication (necessary if it cannot be determined automatically).
vintage
Vintage to be supplied (if supported by db).
panel
Panel to be supplied (if supported by db).

Value

A time series matrix.

Details

These functions provide standard SQL queries that can be used by other packages such as TSMySQL and TSSQLite that provide connections. These functions would usually not be called directly by the user. Thus the package will typically be imported by other packages but need not be attached.

See Also

TSdbi-package, dbConnect, TSget, TSput, TSdelete, TSmeta, TSdates tfwindow