Incorrect SQL database VariableType using SELECT function
이전 댓글 표시
I have a well established database that uses the following schema.

When I attempt to read data from this table (using a complex SQL query, joining mutliple tables), the two colums that are not integers (TSL_DELAY and TSL_WIDTH) are incorrectly interpreted as a SINGLE type (expecting double).

Example data as it appears using MSAccess (left) and after import into MATLAB (right). As you can see, the problem is it is rounding (truncating) the significant digits on the delay value (this is not a display format issue).

This behavior is also present when using the Database Explorer to directly view the table.

I found one other thread (link below) on this issue, but no resolution outside of individually typcasting each column to double (this does work).
https://www.mathworks.com/matlabcentral/answers/770188-double-data-is-loading-as-single-from-database-when-database-reports-double

Polling the userbase to see if anyone has any better solutions to this issue, I'll also submit a bug report linking this forum.
답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!