Clear Filters
Clear Filters

Problems with exporting multiple datatypes from database toolbox

2 views (last 30 days)
Hi all,
I am trying to export a dataset with multiple datatypes (integers +floats) to a Postgres SQL database using the insert function, but am experiencing multiple issues.
1) When trying to use insert and a cell array as input, the function only allows one datatype (either integers or doubles). When mixing, get fault messages like "Invalid input value at row 1, column 14. Expected double."
2) When trying to using use a struct instead of a cell array, I get "Error using database.odbc.connection/insert (line 268) Input structure must contain fields of type double or cell"
3) When trying to export Boolean data, I get "Error using database.odbc.connection/insert (line 268) Driver unable to retrieve length for column number: 2"
4) When importing data and examining the metadata, numbers that are specified as double precision in the database are listed as VariableType 'single'.
Has anyone had experience with any of these issues?
  2 Comments
MSTK
MSTK on 26 May 2017
The issues number 3 and 4 were resolved by switching to the JDBC driver.
MSTK
MSTK on 26 May 2017
As was issue 1 and 2. The documentation should contain a recommendation to use the JDBC driver.

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!