Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sql_quote

Helper function for quoting sql elements.


Description

If the quote character is present in the string, it will be doubled. NAs will be replaced with NULL.

Usage

sql_quote(x, quote)

Arguments

x

Character vector to escape.

quote

Single quoting character.

Examples

sql_quote("abc", "'")
sql_quote("I've had a good day", "'")
sql_quote(c("abc", NA), "'")

dbplyr

A 'dplyr' Back End for Databases

v2.1.1
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre], Maximilian Girlich [aut], Edgar Ruiz [aut], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.