paren: Surround the elements in parenthesis with optional single...

Description Usage Arguments Value Examples

Description

Mainly to use with SQL IN operator. Surround the elements in parenthesis. Each element will be single quoted depending on the data type.

Usage

1
paren(x)

Arguments

x

vector

Value

a character string

Examples

1
2
3
4
5
paren(1:5)
paren(letters[1:5])
# Use as follows to build SQL queries
paste("select * from schema.table where id in", paren(1:5), ";")
paste("select * from schema.table where id in", paren(letters[1:6]), ";")

taekyunk/sql.helper documentation built on May 20, 2019, 1:30 p.m.