SQL Query on DECIMAL returns characters
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have an SQL-Query (SELECT * FROM MyTable) which is executed on a Microsoft SQL Server. One column is formattet as DECIMAL(18,10) not nullable in the SQL table, but the reuslt in Matlab is characters, and aslo the decimal point is returned as a comma.
So instead of 11229.3 I get '11229,3'
An other column which is INT works correctly and I have a number in Matlab.
(Maybe this has something to do with the interchanged comma and decimal point in Germany? For Example in Excel we have 11.229,3 but Matlab and SQL both usually have the number format like this: 11229.3)
Of course I can somehow in Matlab convert the string to a number, but I am looking for a clean solution.
Thanks for the support.
1 Kommentar
Dave Chandler
am 7 Dez. 2022
A little more information might be helpful:
Are you using a JDBC or ODBC driver?
Which version of MATLAB are you using?
Can you share sample code on how you are fetching the data?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Database Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!