Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Is there a way to add comments in SQL?
Using -- makes the service invoke fail, with message The index .. is out of range.
Without comments the SQL query works as designed.
Kind regards,
SImon
Solved! Go to Solution.
I have done some more research and it seems to occur when there is the following in the comment:
[[SomeText]]
Hi Simon, did you try something like this
/* Get All tables from DB.*/
Select * from tab
At least i use it for the Oracle not sure which DB you running.
Hello Sushant,
I am using a MS SQL server and using /* My comment */ gives the same error
Simon, I tested it with SQL Server too and it works without any problems. Would it be possible for you to post a sample SQL query you are using with the comment(s)?
BTW i could use the /* bla */ format for commenting while querying the SQL Server table.
I have done some more research and it seems to occur when there is the following in the comment:
[[SomeText]]