Re: [R] Can RMySQL be used for a paramterized query?

2010-06-10 Thread Henrique Dallazuanna
I think you can do this: ids - dbGetQuery(conn, SELECT id FROM my_table) other_table - dbGetQuery(conn, sprintf(SELECT * FROM my_other_table WHERE t1_id in (%s), paste(ids, collapse = ,))) On Wed, Jun 9, 2010 at 11:24 PM, Ted Byers r.ted.by...@gmail.com wrote: I have not found anything about

Re: [R] Can RMySQL be used for a paramterized query?

2010-06-10 Thread Ted Byers
To: Ted Byers Cc: R-help Forum Subject: Re: [R] Can RMySQL be used for a paramterized query? I think you can do this: ids - dbGetQuery(conn, SELECT id FROM my_table) other_table - dbGetQuery(conn, sprintf(SELECT * FROM my_other_table WHERE t1_id in (%s), paste(ids, collapse

Re: [R] Can RMySQL be used for a paramterized query?

2010-06-10 Thread Paul Gilbert
- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Henrique Dallazuanna Sent: June 10, 2010 8:47 AM To: Ted Byers Cc: R-help Forum Subject: Re: [R] Can RMySQL be used for a paramterized query? I think you can do this: ids - dbGetQuery(conn, SELECT id FROM my_table

[R] Can RMySQL be used for a paramterized query?

2010-06-09 Thread Ted Byers
I have not found anything about this except the following from the DBI documentation : Bind variables: the interface is heavily biased towards queries, as opposed to general purpose database development. In particular we made no attempt to define “bind variables”; this is a mechanism by which