Learn R Programming

toaster (version 0.3.1)

isTable: Test if table present in the database.

Description

Test if table present in the database.

Usage

isTable(channel, names)

Arguments

channel
object as returned by odbcConnect.
names
vector of table names. Name may contain SQL wildcard characters but it should not contain schema prefix. All visible schemas will be checked for table name specified.

Value

  • logical vector indicating if corresponding name is table in Aster database.

See Also

getTableSummary

Examples

Run this code
if(interactive()){
# initialize connection to Lahman baseball database in Aster 
conn = odbcDriverConnect(connection="driver={Aster ODBC Driver};
                         server=<dbhost>;port=2406;database=<dbname>;uid=<user>;pwd=<pw>")

isTable(conn, "pitching")        # TRUE 
isTable(conn, "pitch%")          # TRUE
isTable(conn, "public.pitching") # FALSE
}

Run the code above in your browser using DataLab