Skip to content

Problem with SQLDF - Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: no such table:

6 messages · Gabor Grothendieck, Shivam, jim holtman

#
On Wed, May 9, 2012 at 5:58 PM, Shivam <shivamsingh at gmail.com> wrote:
Never put POSIXlt objects into data frames.
#
I think your problem is caused by DTTM in testeq being POSIXlt.  This
is a strange class to have in a dataframe.  Try is as POSIXct.

Example:
'data.frame':   6 obs. of  5 variables:
 $ NAME  : chr  "DLF" "DLF" "DLF" "DLF" ...
 $ TMSTMP: chr  "09:07:07" "09:15:03" "09:15:03" "09:15:03" ...
 $ PRICE : num  295 294 294 295 295 ...
 $ DATE  : Factor w/ 124 levels "2011-01-03","2011-01-04",..: 1 1 1 1 1 1
 $ DTTM  : POSIXlt, format: "2011-01-03 09:07:07" "2011-01-03
09:15:03" "2011-01-03 09:15:03" ...
Error in sqliteExecStatement(con, statement, bind.data) :
  RS-DBI driver: (error in statement: no such table: testeq)
In addition: Warning message:
In value[[3L]](cond) : RAW() can only be applied to a 'raw', not a 'double'

Enter a frame number, or 0 to exit

1: sqldf("select * from testeq")
2: dbGetQuery(connection, xi)
3: dbGetQuery(connection, xi)
4: sqliteQuickSQL(conn, statement, ...)
5: sqliteExecStatement(con, statement, bind.data)


Selection: sqldf("select * from testeq")>
NAME   TMSTMP PRICE       DATE                DTTM
1  DLF 09:07:07 295.0 2011-01-03 2011-01-03 14:07:07
2  DLF 09:15:03 294.5 2011-01-03 2011-01-03 14:15:03
3  DLF 09:15:03 293.9 2011-01-03 2011-01-03 14:15:03
4  DLF 09:15:03 294.9 2011-01-03 2011-01-03 14:15:03
5  DLF 09:15:03 295.0 2011-01-03 2011-01-03 14:15:03
6  DLF 09:15:04 294.5 2011-01-03 2011-01-03 14:15:04

        
On Wed, May 9, 2012 at 5:58 PM, Shivam <shivamsingh at gmail.com> wrote:

  
    
#
On Wed, May 9, 2012 at 7:24 PM, Shivam <shivamsingh at gmail.com> wrote:
Its not just sqldf.  You will have other problems too if you put
POSIXlt objects in data frames too.

See R News 4/1.