# Named Query parameter clash with comments line. Generates error "index out of range"

**URL:** <https://forum.inductiveautomation.com/t/named-query-parameter-clash-with-comments-line-generates-error-index-out-of-range/35867>\
**Category:** Ignition\
**Created:** [June 22, 2020, 10:16am UTC](https://forum.inductiveautomation.com/t/named-query-parameter-clash-with-comments-line-generates-error-index-out-of-range/35867 "2020-06-22T10:16:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guganathan.r](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@guganathan.r](https://forum.inductiveautomation.com/u/guganathan.r)\
**Post date:** [June 22, 2020, 10:16am UTC](https://forum.inductiveautomation.com/t/named-query-parameter-clash-with-comments-line-generates-error-index-out-of-range/35867/1 "2020-06-22T10:16:25Z")

</div>

Hi,

I’m a beginner in SQL. Not sure this is a bug or expected result.  
On a named query, when I make a code line as comments with ‘–’ , the parameter inside the comment line clashes with same parameter in actual code.  
I hope anything followed by “:” is considered as parameter irrespective of comment line

I was struggling long time to find this out!!!

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/e/8e922e01c8744e196b3495dfe57863e6a38999f5.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 22, 2020, 12:16pm UTC](https://forum.inductiveautomation.com/t/named-query-parameter-clash-with-comments-line-generates-error-index-out-of-range/35867/2 "2020-06-22T12:16:21Z")

</div>

Don’t use comments. Ignition uses a JDBC driver to talk to your database, and only strict SQL is generally supported. Running in your database’s workspace is not equivalent–those generally accept a scriptable superset of SQL, and comments are considered scripting by most DBs.

---

<div class="post-metadata">

**Author:** ![guganathan.r](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@guganathan.r](https://forum.inductiveautomation.com/u/guganathan.r)\
**Post date:** [June 22, 2020, 12:28pm UTC](https://forum.inductiveautomation.com/t/named-query-parameter-clash-with-comments-line-generates-error-index-out-of-range/35867/3 "2020-06-22T12:28:07Z")

</div>

Thanks for prompt response. Noted your advice.
