Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

SSAS Data Source View Named Query breaks with -- comments

Using the SSAS project designer in visual studio one can create and edit named queries within a Data Source View.

Within the editor, one can paste formatted SQL, including -- comments (end of line comments), these queries are accepted, and test as valid from within the designer.

When SSAS executes the query, however, the text is reformatted, not honoring the original line breaks, so the -- comment now takes all of the rest of the SQL query, resulting in processing errors, or worse, possibly NOT resulting in processing errors, just wrong data, depending on where the comment appeared in the source text.

0 votes
Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)

We’ll send you updates on this idea

AdminMicrosoft SQL Server (Product Manager, Microsoft Azure) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

Upvotes: 1

<=-=Aug 9 2017 5:02PM=-=>

Note that the designer correctly stores the newlines from the original SQL text in the horrible attribute format that’s used in the DSV. It’s SSAS that’s throwing them away when it wraps the DSV query in its own wrapper query.

0 comments

Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
Submitting...
An error occurred while saving the comment

Feedback and Knowledge Base