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

3 views (last 30 days)
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 Comments
Daniel Wesch
Daniel Wesch on 24 Aug 2017
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 on 30 Aug 2017
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

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!