RODBC string getting truncated

后端 未结 3 1162
既然无缘
既然无缘 2021-01-18 11:17

I am fetching data from MySql Server into R using RODBC.
So in one column of the database is a character vector

SELECT MAX(CHAR_LENGTH(column)) FROM req         


        
相关标签:
3条回答
  • 2021-01-18 11:32

    Another possibility why the retrieved number of characters might be limited is a 'sanity' check restriction to 65535 bytes in the RODBC package itself -- as mentioned here.

    0 讨论(0)
  • 2021-01-18 11:42

    You could try to use another db driver such as JDBC. In my experience this has sometimes solved the problem.

    Also, try the RMySQL package (current binaries need to be compiled. if you do compile them yourself, request you to please share with the community)

    Probably the source of the RODBC package "could" provide insights into the default length limitations if any. (I haven't looked at it yet, but I will soon and post an update here)

    0 讨论(0)
  • 2021-01-18 11:46

    The PostgreSQL ODBC driver has a variable called MaxLongVarcharSize that I have found set to 8190 by default (I've used it both on Windows and Ubuntu). It is possible that the MySQL ODBC driver has a similar variable set to 255.

    0 讨论(0)
提交回复
热议问题