View source: R/SQL_Functions.R
PostGRE_Query | R Documentation |
PostGRE_Query get data from a database table
PostGRE_Query(
Query = NULL,
Connection = NULL,
CloseConnection = FALSE,
Host = NULL,
DBName = NULL,
User = NULL,
Port = NULL,
Password = NULL
)
Query |
SQL Statement in quotes |
Connection |
db connection |
CloseConnection |
= FALSE |
Host |
If Connection is NULL then this must be supplied. host |
DBName |
If Connection is NULL then this must be supplied. dbname |
User |
If Connection is NULL then this must be supplied. user |
Port |
If Connection is NULL then this must be supplied. port |
Password |
If Connection is NULL then this must be supplied. password |
Adrian Antico
Other Database:
AutoDataDictionaries()
,
PostGRE_AppendData()
,
PostGRE_CreateTable()
,
PostGRE_GetTableNames()
,
PostGRE_ListTables()
,
PostGRE_RemoveCreateAppend()
,
PostGRE_RemoveTable()
,
PosteGRE_CreateDatabase()
,
PosteGRE_DropDB()
,
PosteGRE_ListDatabases()
,
SQL_ClearTable()
,
SQL_DropTable()
,
SQL_Query_Push()
,
SQL_Query()
,
SQL_SaveTable()
,
SQL_Server_DBConnection()
## Not run:
# Query data from table with Uppercase name
data <- AutoQuant::PostGRE_Query(
Query = paste0("SELECT * FROM ", shQuote('Devices')),
Host = 'localhost',
CloseConnection = FALSE,
DBName = 'Testing',
User = 'postgres',
Port = 5432,
Password = 'Aa...')
# Query = 'Select * from static_data'
# Host = 'localhost'
# DBName = 'Testing'
# CloseConnection = FALSE,
# User = 'postgres'
# Port = 5432
# Password = 'Aa...'
# Create Schema
query <- "CREATE SCHEMA AutoQuant AUTHORIZATION postgres;"
AutoQuant::PostGRE_Query(
Query = query,
Host = 'localhost',
CloseConnection = FALSE,
DBName = 'Testing',
User = 'postgres',
Port = 5432,
Password = 'Aa...')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.