inlist: Generate a SQL IN statement from a mapping file

View source: R/inlist.R

inlistR Documentation

Generate a SQL IN statement from a mapping file

Description

This function constructs an IN statement from a mapping file or dataframe. It assumes that the first column of the data contains the list of values to check for.

Usage

inlist(inputfile = NULL, header = FALSE)

Arguments

inputfile

Dataframe OR path to the mapping file

header

If reading a csv file, TRUE if the file includes a header row, FALSE if it does not include a header row.

Value

A string that represents the constructed CASE statement

Examples

 input <- Data_Frame <- data.frame(Training = c("Strength", "Stamina",
  "Other"))
 result <- inlist(inputfile = input, header = TRUE)

sqlcaser documentation built on Nov. 24, 2023, 5:08 p.m.