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

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

Jan
Jan 2017년 8월 24일
편집: Jan 2017년 8월 24일
We do not know the string you are talking of, but only the number of characters. There can be a lot of different problems- Therefore I think it is impossible to point in the right direction yet. If the problem is even not reproducible, there is no remote debugging without a crystal ball and time machine.
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.
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개)

카테고리

질문:

2017년 8월 24일

댓글:

2017년 8월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by