Rdocumentation
powered by
Learn R Programming
CITAN (version 2011.08-1)
sqlEscapeTrim: Escape character strings for use in an SQL query and trim white-spaces on both sides
Description
Escapes given character strings for use in an SQL query and trims white-spaces on both sides.
Usage
sqlEscapeTrim(str, useBytes=FALSE)
Arguments
str
a character vector where matches are sought, or an object which can be coerced by
as.character
to a character vector.
useBytes
logical. If
TRUE
the matching is done byte-by-byte rather than character-by-character. See man page for
gsub
.
Value
See 'Value' for
gsub
.
Details
The SQL standard specifies that single-quotes in strings should be escaped by putting two single quotes in a row. This function repeats the quotes using
gsub
.
See Also
gsub
,
sqlEscape
,
sqlTrim