run_sql: Run SQL

View source: R/utils.R

run_sqlR Documentation

Run SQL

Description

Run SQL

Usage

run_sql(database, query)

Arguments

database

The name of the database.

query

The query to run.

Details

If you need to use a user-password setup to access the databases, then you will need to set the R options in your .Rprofile file: pbs.uid, pbs.pwd, pbs.ip, pbs.sqldriver. E.g. options(pbs.uid="MyUserName") The default SQL driver will be "SQL Server" if not specified in the options. This will probably work for most people. You might try using usethis::edit_r_profile() if you need help finding your R profile file.

Examples

## Not run: 
run_sql("GFBioSQL", "EXEC sp_who2")

## End(Not run)

pbs-assess/gfdata documentation built on Feb. 16, 2025, 7:47 a.m.