tags:

views:

37

answers:

1

RMysql's dbGetQuery converts BigInt to numeric types. This alters some of the values. How can I read the BigInt fields as strings instead of numeric?

+2  A: 

One way would be to cast on the SQL side of things:

select cast(foo as char), bar from someTable;

You may have to look up the exact MySQL casting syntax for details.

[ By the way, there is no tag [rstats] here. ]

Dirk Eddelbuettel
thanks, that does work but i think you mean: cast(foo as char)
tommy chheng
Yup, thanks, fixed.
Dirk Eddelbuettel