Description Usage Arguments Details Value Examples
This function renders, translates and executes one single SQL statement that produces a result
1 | executeSQL(connection, schema, query, targetDBMS)
|
connection |
The connection to the database server. |
schema |
The database schema being used. |
query |
The SQL statement to retrieve the data. |
targetDBMS |
The target DBMS for SQL to be rendered in. |
Renders, translates, and executes a single SQL statement that is expeting to produce and result.
An object containing the data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library("SqlRender")
library("DatabaseConnector")
library("Aphordite")
connectionDetails <- createConnectionDetails(dbms="mysql", server="localhost",
user="root", password="blah" ,schema="cdm_v5")
conn <- connect(connectionDetails)
concept_of_interest <- executeSQL(connection, schema, paste("SELECT concept_id,
concept_name FROM @cdmSchema.concept WHERE lower(concept_name) =
lower('myocardial infarction') AND standard_concept = 'S' AND
invalid_reason IS NULL AND domain_id = 'Condition';" ,sep = ""),dbms)
dbDisconnect(conn)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.