Y'all I've got the weirdest thing. I've got a database that's SQL Server and I connect to it all the time. Tonight, when doing one join that I know worked a year ago, I only get back the first digit from each character field. Other data types return the whole thing, but not character
I end up with a mess like this:
After a few hours of all the usual tests and checks (including rebooting), I am going to go through and try and produce a reproducible example. I can't quite figure out how to reproduce, tbh. But I'll work on it. Before I do, have any of you seen this type of hot mess? Googling for this is hard because of the search noise of people WANTING only the first character.
I'll come back later with reprex, if I can make one. But I thought I'd put out my feelers before I dumped more hours into this.
Databases often have metadata tables that would show the column datatatypes etc. If a history of these exist, I would check if the column definitions changed at some point in history.
Ultimately this issue may require you being supported by a database admin, or some stakeholder who is responsible for the data contents to work with you to resolve.
Big ups to @jimhester who helped me figure this out. I'm on a Mac and this is from a bug in the odbc package. The solution was simply to install odbc from source:
You actually don't need to install the development version, just recompiling the code from CRAN will work as well, e.g. install.packages("odbc", type = "source")