Reputation: 7109
I'm trying to upload some data to my Oracle 11g database using the ROracle package (1.1-10) in 64bit R3.0.0 on Windows 7 64-bit.
The ROracle help for dbWriteTable
states:
Date and POSIXct map to Oracle DATE ROracle - the ROracle package R - the R application POSIXct - the POSIXct class TIMESTAMP TIMESTAMP WITH TIME ZONE TIMESTAMP WITH LOCAL TIME ZONE
Yet when I run this R code...
df <- data.frame(a = as.Date(c("2012-01-01","2013-02-07")), b = c("one","two"))
drv <- dbDriver("Oracle")
myconn <- dbConnect(drv, "XXXXX", "XXXXX", "XXXXX")
dbWriteTable(myconn, "MY_TABLE", overwrite = TRUE)
It produces a table in Oracle like so...
Anyone know what gives? Am I reading the help docs wrong?
I've written a function that converts those to DATE in Oracle using the alter table syntax, but I'd much rather not have to...
Upvotes: 3
Views: 1352
Reputation: 7109
After speaking with the package maintainer, this looks like a bug, and they're hoping to fix it in the next release (which will be 1.1-11)
Upvotes: 4