DBI_getColNames: Retrieve Column Names from an Microsoft SQL Connection

View source: R/DBIhelpers.R

DBI_getColNamesR Documentation

Retrieve Column Names from an Microsoft SQL Connection

Description

[Stable]

Usage

DBI_getColNames(conn, schema, tableName)

Arguments

conn

A DBIConnection object, as returned by dbConnect().

schema

Name of schema that table is under. character vector of length 1.

tableName

Name of table. character vector of length 1.

Value

Character vector of column names in specified table.

Creation notes

First created on 2020-11-03 with the script OSMdownloadAndSFtoSQLInterface.R in the MARC-KC/HelpLibrary Repository

Author(s)

Jacob Peterson

Examples

## Not run: 
library(DBI)

con <- connectODBC("<servername>.<databaseName>.<schemaName>")

tableColNames <- DBI_getColNames(con, "<schemaName>", "<tableName>")

## End(Not run)

MARC-KC/marcR documentation built on June 2, 2022, 9:31 p.m.