R/get_field_names.R

Defines functions get_field_names

Documented in get_field_names

#' Creata line for a LaTeX codebook. 
#'
#' @param con connection to database 
#' @param tablename to check, without schema 
#' @return column of column names 
#' @export
get_field_names <- function(con, tablename){
    query <- paste("select column_name from information_schema.columns where table_name='",
                   tablename, "'", sep = "")
    dbGetQuery(con, query)[,c("column_name")]
}
johnjosephhorton/JJHmisc documentation built on May 19, 2019, 5:15 p.m.