Why do i get {'No Data'} from large SQL query?

6 次查看(过去 30 天)
Hi,
I have a large SQL query string (6481 chars), which i have succesfully converted into a Matlab string. Sucessfully, since copying the string and inserting it into SQL Management Studio yields the correct table.
Now, retrieving the data through Matlab's database tools yields a 1x1 cell containing the string 'No Data'.
I've done hundreds of queries through the database tool, so I fail to see how this differs - the query is a bit more complicated than usual, but surely this should have no effect.
I'm aware it's a bit hard to troubleshoot, since it can't be reproduced, but please point me in the (a) right direction.
The server is running on Windows NT 6.3 (9600), 64 bits and the driver is ODBC.
With Microsoft SQL Server Enterprise V. 12.0.5000.0.
I'm using MATLAB R2016b.
Thanks!
  3 个评论
Daniel Wesch
Daniel Wesch 2017-8-24
Yeah, I know, which is why I already flagged that. I had hoped that there might be some relatively known, generic problem.
In a nutshell, the problem is that the string works in SQL mgmt, but doesn't through the Matlab database tool.
Sailesh Sidhwani
Sailesh Sidhwani 2017-8-30
Hi Daniel,
If possible you can try switching to the JDBC driver and see if that resolves the issue. Also, following is link of common error with fetching data in MATLAB: https://www.mathworks.com/help/database/ug/fetching-data-common-errors.html

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by