Run a SQL query via DBI::dbGetQuery using the format expected by glue_sql. Values from lMapping provided using the format expected by qlue_sql (e.g. strIDCol
) will be replaced with the appropriate column names/values.
Examples
df <- data.frame(
Name = c("John", "Jane", "Bob"),
Age = c(25, 30, 35),
Salary = c(50000, 60000, 70000)
)
query <- "SELECT * FROM df WHERE AGE > 30"
result <- RunQuery(query, df)
#> Warning: no DISPLAY variable so Tk is not available
#> SQL Query complete: 1 rows returned.