Why is a string field resulting from a CONCAT statement imported as blob when using Database Toolbox with MySQL?
Show older comments
I am importing data from a MySQL database using Database Toolbox. One of the fields of my query is the result of a concatenation.
e = exec(conn, 'SELECT CONCAT(field1," is equal to ",field2) from test')
The data is imported as an array of numbers of type int8 which appear to be ASCII values. If I use the CHAR function, the correct characters are displayed.
By examining the attributes of the field, I see that the field is of type blob.
fieldName: 'CONCAT(field1," is equal to ",field2)'
typeName: 'blob'
typeValue: -4
columnWidth: 16777215
precision: []
scale: []
currency: 'false'
readOnly: 'true'
nullable: 'true'
Message: []
Accepted Answer
More Answers (0)
Categories
Find more on Database Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!