I'm looking for a way to include data from an R
dataframe in a sql predicate. Ideally, I'd like to use dbSendQuery
from the RMySQL
package to send a query to my database that contains a WHERE ... IN
conditions that includes values from my database. Is this possible?
Example data frame
BUR
LAX
LGB
Example query
SELECT * FROM table WHERE airport IN ('BUR', 'LAX', 'LGB')
Is there a way to "pass" the rows of my data frame to a query? This might not be possible, but I'm interested to know.