Skip to content
Prev 274859 / 398506 Next

Using SQL "IN" with RJDBC or RMySQL

On Wed, Oct 19, 2011 at 12:35 AM, David Epstein <davideps at umich.edu> wrote:
With gsubfn if  you preface your function with fn$ as shown below then
it turns on a quasi-perl style string interpolation:

library(gsubfn)
organization <- 3
org_table <- fn$dbGetQuery(conn,""SELECT id,organization_name FROM
civicrm_contact WHERE contact_type=$organization")

See ?fn and the gsubfn home page (http://gsubfn.googlecode.com) for details.