Skip to content
Prev 389807 / 398506 Next

How to select single table with ODB package

Hello,
I am connecting R to a libreoffice-generated database (.odb) using the
ODB package.
I would like to link a dataframe to a specific table, but I cannot
manage to extract a given table:
```
$demographic
field.name field.type data.type     name                  comment
1          ID    INTEGER   numeric       ID Unique identifier (auto)
2    Study_ID    INTEGER   numeric Study_ID            link to STUDY
[...]
+ encode = TRUE, autoLogical = TRUE)
Error: Error while executing SQL query  : "Unable to retrieve JDBC result set
  JDBC ERROR: Unexpected token: FROM in statement [FROM]
  Statement: FROM TABLE demographic SELECT ALL"
+ encode = TRUE, autoLogical = TRUE)
Error: Error while executing SQL query  : "Unable to retrieve JDBC result set
  JDBC ERROR: Table not found in statement [SELECT * FROM demographic]
  Statement: SELECT * FROM demographic"
+ encode = TRUE, autoLogical = TRUE)
Error: Error while executing SQL query  : "Unable to retrieve JDBC result set
  JDBC ERROR: Table not found in statement [SELECT * FROM db$demographic]
  Statement: SELECT * FROM db$demographic"
```
What is the correct syntax?
Thank you