Format vector of values into a string suitable for an SQL IN
statement.
Source: R/SDA_query.R
format_SQL_in_statement.Rd
Concatenate a vector to SQL IN
-compatible syntax: letters[1:3]
becomes ('a','b','c')
. Values in x
are first passed through unique()
.
Value
A character vector (unit length) containing concatenated group syntax for use in SQL IN
, with unique value found in x
.
Examples
format_SQL_in_statement(c(2648889L, 2648890L))
#> [1] "('2648889','2648890')"