toQuoted {openMpp} | R Documentation |
Return SQL-quoted string: O'Connor -> 'O”Connor'
toQuoted(srcStr)
srcStr |
|
Duplicate each apostrophe and enclose result in 'apostrophes'
Return SQL-quoted string: O'Connor -> 'O”Connor'
amc1999
OpenM++ documentation: https://github.com/openmpp/openmpp.github.io/wiki
https://github.com/openmpp/openmpp.github.io/wiki
someName <- toQuoted("O'Connor") # someName # [1] "'O''Connor'" sql <- paste( "SELECT * FROM someTable WHERE name = ", toQuoted("O'Connor"), sep="" ) # sql # [1] "SELECT * FROM someTable WHERE name = 'O''Connor'"