The function executes a SQL select statements in the database and returns the fetched set of rows as a data.table.
genericQuery(dbToken, queryString, queryParams = NULL)
Data.table with the set of fetched rows
Mandatory
Token for the open database connection (see initEnvironment
).
Mandatory, character.
The select statement to execute
Optional, character.
A variable with values for bind variable referenced in the where clause of
the select statement
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"))
}
Run the code above in your browser using DataLab