New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbGetQuery() returns random results for DATETIME fields instead of NULL with Azure DB #408
Comments
@mikecrobp I don't have access to Azure DB.
If Yes, and No then I have an idea what the issue might be. If I were to put together a custom patch, do you have the ability to re-build the package and test it out? Thanks |
Thanks. Indeed I do have VARCHAR (in fact NVARCHAR) columns in the query before the first datetime. And selecting the DATETIME only eliminates the problem. I am happy to test a custom path. I might need a few instructions to build a new copy of the library from the source - but very happy to. Mike |
Mike: If you get a chance, try building / testing with the branch: https://github.com/detule/odbc/tree/fixup/null_detection_unbound_types |
I had some issues but have now tested my problem dates and they are now showing NA where there is NULL in database Installation method: install_github("https://github.com/detule/odbc/tree/fixup/null_detection_unbound_types" ) Mike |
Issue Description and Expected Result
have just started to use dbGetQuery(). Connection and dbGetQuery complete OK.
All values OK - except for DateTime fields where type is DATETIME2 and value is NULL. In this case the result is not NULL and is a random date, sometimes negative.
Database
Microsoft Azure SQL Data Warehouse 10.0.15543
ODBC Driver is "ODBC Driver 17 for SQL Server"
Reproducible Example
A simple SELECT * FROM table should show this if my problem is not 100% local
R and odbc fully up to date
The text was updated successfully, but these errors were encountered: