How can I customize null value handling with cursor-based fetch?
4 views (last 30 days)
Show older comments
MathWorks Support Team
on 10 Nov 2022
Answered: MathWorks Support Team
on 15 Nov 2022
I am using the cursor-based 'fetch' command (from the Database Toolbox) to read data from a database. However, the way null values are read differs across operating systems. Is there a global customization I can use to dictate the way fetch reads null values? The 'databaseImportOptions'/'SQLImportOptions' functions do not work for this import method.
Accepted Answer
MathWorks Support Team
on 10 Nov 2022
Use the ‘setdbprefs’ function to specify how null values are read. Specifically, the “NullNumberRead” and “NullStringRead” fields specify how null numeric and character data is read into MATLAB.
0 Comments
More Answers (0)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!