Skip to contents

The function executes a SQL select statements in the database and returns the fetched set of rows as a data.table.

Usage

genericQuery(dbToken, queryString, queryParams = NULL)

Arguments

dbToken

Mandatory
Token for the open database connection (see initEnvironment).

queryString

Mandatory, character.
The select statement to execute

queryParams

Optional, character.
A variable with values for bind variable referenced in the where clause of the select statement

Value

Data.table with the set of fetched rows

Examples


if (FALSE) {
genericQuery(dbToken,
             'select studyid, tsseq, tsgrpid, tsparmcd, tsval from ts')
genericQuery(dbToken,
             'select studyid, tsval from ts where tsprmcd = "SDESIGN" and studyid in (:1)',
             list("1234546","222333","444555"))
}