Skip to content
Back to formatted view

Raw Message

Message-ID: <1319031471.2897.6.camel@system76-pc>
Date: 2011-10-19T13:37:51Z
From: David Epstein
Subject: Using SQL "IN" with RJDBC or RMySQL
In-Reply-To: <CAP01uRn2qMEkJQQ3xixeU3gcHJKMHF7w9_nyzuAGsZXec9XbfQ@mail.gmail.com>

Gabor,

thank you. I just got the script working using paste but your solution
looks good as well. I was not familiar with gsubfn. Appears very useful.

-david


> 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.
>