cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

SQL Comment

sdejager
7-Bedrock

SQL Comment

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

ACCEPTED SOLUTION

Accepted Solutions

I have done some more research and it seems to occur when there is the following in the comment:
[[SomeText]]

View solution in original post

4 REPLIES 4
supandey
19-Tanzanite
(To:sdejager)

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

supandey
19-Tanzanite
(To:sdejager)

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]]

Announcements


Top Tags