[#6526] - Bad interpretation of SQL-Query-comments

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

If I include a comment (prefixed with -- as line or /* */ for multi-line) in my SQL-Query that includes a parameter, like for example -- $P{REPORT_CONTEXT}, the Jasperstudio SQL Parser seems to interpret this, it gives me the error "Invalid column index" although the query is completely correct. When I remove the comment, everything works fine.
So it seems to interpret the parameter expression within a comment, very confusing!

v6.1.1
sibylle.koetzer's picture
Joined: Dec 2 2015 - 7:46am
Last seen: 4 years 3 months ago

4 Comments:

#1
  • Assigned:nobody» chicuslavic

could you add your query to the description?

#2

Hello chicuslavic,
you can just use an example query (from the Sample DB) followed by a comment like that:

Select * from Address where city = 'Oslo'
-- now follows a comment with any parameter: $P{REPORT_CONTEXT}

Greetings, Sibylle

#3
  • Assigned:chicuslavic» teodord
#4
  • Assigned:nobody»

Can confirm. This is a major problem. Which version will it be resolved in?

Feedback