I would like to make the following statement:
SELECT fieldA, fieldB
FROM tableA
WHERE fielb != 'cond' GROUP BY fieldA.
This statement works with SQLite Manager but does not work in RSQLite.
Could you please help me?
Thank you very much :)
I would like to make the following statement:
SELECT fieldA, fieldB
FROM tableA
WHERE fielb != 'cond' GROUP BY fieldA.
This statement works with SQLite Manager but does not work in RSQLite.
Could you please help me?
Thank you very much :)
To me, !=
works as it should. Here is an example:
data(USArrests)
library(RSQLite)
m <- dbDriver("SQLite")
tfile <- tempfile()
con <- dbConnect(m, dbname = tfile)
dbWriteTable(con, "USArrests", USArrests)
rs <- dbSendQuery(con, "select * from USArrests where row_names != 'Alaska'")
d <- fetch(rs, n = -1) # extract all remaining data
setdiff(row.names(USArrests), d$row_names)
# [1] "Alaska"
dbHasCompleted(rs)
dbClearResult(rs)
dbListTables(con)
dbDisconnect(con)
file.remove(tfile)