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:
>
> libr
On Wed, Oct 19, 2011 at 12:35 AM, David Epstein wrote:
> Hello,
>
>
> The code below works fine up until I try to use the "IN" statement in
> the last line. The proper SQL format is:
>
> SELECT * FROM this_table WHERE this_column IN (1,2,3,4,5)
>
> But, I think I may be getting something like:
>
>
thank you! I was able to get it to work with
collapse=","
On Wed, 2011-10-19 at 01:52 -0500, Jeff Newmiller wrote:
> paste("SELECT * FROM this_table WHERE this_column IN (",
> paste(org_table$id, collapse=TRUE),")",sep="")
__
R-help@r-project.org maili
You are misusing SQL variable substitution. Just embed the list in the SQL
statement itself.
paste("SELECT * FROM this_table WHERE this_column IN (", paste(org_table$id,
collapse=TRUE),")",sep="")
Better yet, use a SQL join so you can do this sequence in one SQL statement.
-
Hello,
The code below works fine up until I try to use the "IN" statement in
the last line. The proper SQL format is:
SELECT * FROM this_table WHERE this_column IN (1,2,3,4,5)
But, I think I may be getting something like:
SELECT * FROM this_table WHERE this_column IN c(1,2,3,4,5)
Which makes
5 matches
Mail list logo