RODBC loses time values of datetime when result set is large

后端 未结 8 1898

So this is VERY strange. RODBC seems to drop the time portion of DateTime SQL columns if the result set is large enough. (The queries are running against an SQL S

8条回答
  •  一整个雨季
    2020-12-14 21:57

    Why this happens on large datasets returned from sqlQuery()? I don't know. But was able to workaround it by applying a sql conversion in the sql call:

    data <- sqlQuery(channel, "SELECT CONVERT(nvarchar(24), DtTimeField, 21) AS HourDt, * FROM ...

    This is your workaround.

提交回复
热议问题