When using the RSQLite and DBI package to form a query, I wonder if there is a way to use SQL keyword IN?
I don't think SQL keyword IN is currently implemented?
e.g.
## instead of:
dbGetQuery(con, "SELECT * FROM mtcars WHERE cyl = :targetCyl" ,
params = list( targetCyl = 4 ))
## I want to do the following:
dbGetQuery(con, "SELECT * FROM mtcars WHERE cyl IN :targetCyl" ,
params = list( targetCyl = c( 2, 4, 6 ) ))
SQL's
INoperator requires its arguments to be in parentheses, as inDBIrequires you to instantiate the number of parens you need, as inFYI, this is not specific to SQLite or
RSQLite, it'sDBIin general.