inlist {sqlcaser}R 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)

[Package sqlcaser version 0.2.0 Index]