Why is a string field resulting from a CONCAT statement imported as blob when using Database Toolbox with MySQL?
Ältere Kommentare anzeigen
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: []
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Database Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!