You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to work with SQLite but the use of row_number in distinct(.keep_all=TRUE) isn't quite right for MS SQL Server
library(dplyr)
library(dbplyr)
### need to setup your own SQL Server connectioncon<-DBI::dbConnect(odbc::odbc)
copy_to(con, mtcars)
mtcars2<- tbl(con, "mtcars")
### distinct works as expectedmtcars2 %>% distinct()
### gives error "The function 'ROW_NUMBER' must have an OVER clause with ORDER BY"mtcars2 %>% distinct(carb, .keep_all=TRUE)
The text was updated successfully, but these errors were encountered:
Apparently, it works in most databases according to modern SQL - of course it doesn't work in MS SQL and Oracle DB... If we want to support this, we could add a dummy window order. @hadley what do you think?
@carlganz As I don't have an SQL Server database I can't test this. Can you install the PR version via remotes::install_github("tidyverse/dbplyr#1267") and test whether this now works?
It seems to work with SQLite but the use of row_number in
distinct(.keep_all=TRUE)
isn't quite right for MS SQL ServerThe text was updated successfully, but these errors were encountered: