Skip to content
Prev 1242 / 1559 Next

ROracle 1.1-5 and date fields?

Don,

1) dbListTables now takes two additional arguments that control the display of tables/views in other schemas (assuming you have select access on these). Here is the description from the man page:

     dbListTables(conn, schema = NULL, all = FALSE, full = FALSE, ...)

     all: a logical specifying whether to look at all schemas.

    full: a logical specifying whether to generate schema names. When
          argument 'all' is 'TRUE', the output is a vector containing
          schema names followed by the table names. Using 'matrix(...,
          ncol = 2)' on the output produces a matrix where each row
          corresponds to a table and the columns represent the schema
          names and table names respectively.

If you are interested in particular schema you can use the schema argument:

  schema: a case sensitive character string specifying a schema name
          (or a vector of character strings for 'dbListTables').

2) We are getting ready to roll out ROracle 1.1-6 very soon. It has some fixes to date/time columns. A simple example seems to work fine in my development version:

R> con<-dbConnect(Oracle(), "scott", "tiger")
R> res<-dbGetQuery(con, "select sysdate cd, systimestamp ct from dual")
R> lapply(res, class)
$CD
[1] "POSIXct" "POSIXt" 

$CT
[1] "POSIXct" "POSIXt" 

R> res
                   CD                  CT
1 2012-11-16 16:22:40 2012-11-16 16:22:40

I'll install 1.1-5 and double check that this is indeed a problem to be sure that nothing else is at play here. I did get a report of a similar problem from another user today via email. He was having problem with 
  Select SYSDATE + 1 * Interval '1' Day FROM dual;

Denis

-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] 
Sent: Friday, November 16, 2012 4:08 PM
To: MacQueen, Don
Cc: r-sig-db at r-project.org
Subject: Re: [R-sig-DB] ROracle 1.1-5 and date fields?
On 16/11/2012 19:11, MacQueen, Don wrote:
You need to ask the ROracle maintainer: he does not usually reply here.