Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_chilvers
Specialist
Specialist

Table Comment missing


I like to use 'COMMENT TABLE WITH' as a way to clarify the content and structure of a table, especially when it has been LOADed from several sources or in a specific way.

Eg. COMMENT TABLE Main WITH 'This is the Main table of data';

This works well, but what is the syntax for the comment string? I have just added a long comment over several lines, which did not cause a script error, but has not appeared with the table.

Any ideas?

Thanks

10 Replies
Not applicable

try below, it works for me

COMMENT TABLE TableName WITH 'This is the Main table of data,

a

b

This is the Main table of data.';

Not applicable

Use Trace

nizamsha
Specialist II
Specialist II

if u want to debug each and every table one by one mean use

exit script; at the end of the table u dont need to comment all the other table in other sheet and alll

what exit script do is when it comes to exit script line it will omit all the other table and lines

richard_chilvers
Specialist
Specialist
Author

In my script:

...this works:

COMMENT TABLE Operators WITH

'Records the activity of each call centre operator, booking and quotes.';

...this DOESN'T work (comment does not show):

COMMENT TABLE Telephones WITH

'Records the phone activity of each call centre operator.';

These seem identical to me apart from the obvious table names etc. which I have checked.

I wondered if the position of the statement within the script is important?

Regards

Roop
Specialist
Specialist

Are you sure that this is not mis-spelled or in a section of script that is not run? I have tried and can see that COMMENT statement can be put in at any position in the script but does not come up with an error if you mis-spell the table name. Sorry to search for the obvious.

richard_chilvers
Specialist
Specialist
Author

Rupert

Thanks for taking the time. The 'obvious' is often helpful because we tend to miss it when we're dealing with more complicated stuff !

However, I can be sure that this section of script is run (and have anyway included a TRACE as someone else suggested), and I have double-checked the spelling.

Maybe I will just ignore the issue - its only documentation after all

ThornOfCrowns
Specialist II
Specialist II

Just a thought-  what happens when you remove the comma from the first comment, i.e. 'Records the activity of each call centre operator booking and quotes.'

Does it then appear?

Not applicable

position is not important, what I think important is the table name, otherwise the comment will not display.(if table name is wrong, it won't raise error.)

richard_chilvers
Specialist
Specialist
Author

Hi James

Thanks for taking a look.

In my script, the first comment (ie. the one with the comma) does appear OK. So I guess commas don't matter.