fill does not work with SQL server ```r > tibble(x=c(1,2,3,NA,5,6,NA,NA),i=seq_along(x)) %>% + copy_to(name="test",dest=db_con,temporary=FALSE,overwrite=TRUE,append=FALSE) %>% + window_order(i) %>% + fill(x) Error: nanodbc/nanodbc.cpp:1655: 00000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near 'IGNORE'. [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared. <SQL> 'SELECT TOP 11 "i", LAST_VALUE("x" IGNORE NULLS) OVER (ORDER BY "i") AS "x" FROM "test"' ```
Activity
mgirlich commentedon May 7, 2021
Ah, it seems the
IGNORE NULLSpart should be outside ofLAST_VALUE(). Can you check if your code works after you executed the following codenassuphis commentedon May 7, 2021
will do + revert.
the whole dbplyr package is awesomely useful.
thanks for the all the good work!
mgirlich commentedon Jul 7, 2021
Argh, seems like
IGNORE NULLSis only supported by Azure SQL Edgefabkury commentedon Dec 22, 2022
Same thing happens with Databricks ODBC connections:
I was able to make it work by running this prior to
fill():