I like to comment my work, don't you? It helps the next poor sod figure out what on Earth I was doing when I wrote that query.
However, I have found that some comments break SQL DB2 statements. I played around with the query and found that the query works just fine, it is ONLY the existence of comments in two places break the query, and ONLY in PowerBI.
It makes no difference if I use single-line or multi-line comments.
When I run the query in PBI, I get the following error:
The following highllighted comments are the two instances where comments break the code. The query is a series of CTEs with a simple SELECT * at the end. NOTICE that I use the same commenting everywhere else in the query.
This leads me to beleive that PBI isn't properly reading these comments, perhaps it is extending the comment to the next line.
-------------------------------------------------
I added a new comment today that broke the query. The first-line comment was working before:
I added the following comment under it, which broke the query in PBI. Then on a hunch I just tried removing the apostrophe from the comment, and the code worked again. This is definitely a bug.
10 Comments
- v-qiuyu-msftCommunity Support
Hi BillyT_350,
Does the issue happen to DirectQuery mode or Import mode?
Please update your Power BI desktop to the latest version 2.64.5285.741 then test it again.
Please record a video to show the issue, then share the video and Power BI desktop trace log with us. You can upload them to your Onedrive and send the share link to me via private message.
Best Regards,
Qiuyun Yu - BillyT_350Helper V
@v-qiuyu-msft my version is actually later than that; 2.65.5313.621. That may be part of the problem. Sometimes Microsoft writes code and they don't test it.
I doubt I'd be able to post a video on here, but I can try.
How am I supposed to get a trace? Fiddler?
- v-qiuyu-msftCommunity Support
Hi BillyT_350,
You can enable below option then repeat steps to reproduce the issue, then share desktop trace log: https://ruiromanoblog.wordpress.com/2016/01/08/power-bi-desktop-trace-logs-analyser/.
There is a new Power BI desktop version 2.65.5313.621, you can test with this new version to see if the issue is here.
Best Regards,
Qiuyun Yu - BillyT_350Helper V
v-qiuyu-msft my PBI has updated to 2.65.5313.621, and I am still getting this error. I would like to send you diagnostic info, but I'm sure you will understand that I do not want to post proprietary information on a public forum.
- v-qiuyu-msftCommunity Support
Hi BillyT_350,
Does the issue happen to DirectQuery mode or Import mode?
There is a new Power BI desktop version 2.65.5313.701, you can update your Power BI desktop then test it again.
You can send video and desktop trace log to my work email. I will send my work email to you via private message.
Best Regards,
Qiuyun Yu - BillyT_350Helper V
v-qiuyu-msft Thanks. I'll email you with what I get.
Let's not forget to post here what we discover.
- v-qiuyu-msftCommunity Support
Hi BillyT_350,
Thank you for your detail information. I have consulted this issue internally, will keep you update once I get any information.
Best Regards,
Qiuyun Yu - v-qiuyu-msftCommunity Support
Hi BillyT_350,,
I have reported this issue internally: CRI 97039270. Will keep you update once I get any information.
Best Regards,
Qiuyun Yu - v-qiuyu-msftCommunity SupportStatus changed:NewtoAccepted
- v-yuta-msftCommunity Support