missing comments in views

Tools & Utilities
gb
Fan

missing comments in views

Hi,

I have views with comments (/* */) before the replace statement and within the select statement (--).
When I create the view and show the view ddl afterwards using SQL Asst, I CANNOT see the comments anymore specifically the comments before the replace statement. I am using SQL Asst 7.1 with ODBC 3.05.00.04.
I have replaced the same view with comments using the query tool of Teradata Administrator and I CAN see the comments.

Anyone who may know the reason, please.

Cheers,

Gemma
4 REPLIES
Enthusiast

Re: missing comments in views

When you want the comments saved as part of the view, you have to hit the "Execute Parallel" button (the multiple footsteps button) instead of the "Execute" button.

I believe this is documented even though IMHO it's a poor design. It should be an option somewhere, or better yet, it should always include the comments.
gb
Fan

Re: missing comments in views

Thanks, Barry. It has pointed me to try something. I did as suggested. I have pasted a simple query below in sql asst and hit "execute parallel" which should execute the entire query as a single request, without modification, and did a "show view".

/* view to test */
replace view .
as select * from . -- test comment
/* another test comment */;

The result was as below - the view kept the comment in the body but not the comment before replace.

replace view .
as select * from . -- test comment
/* another test comment */;

Cheers,
gb
Enthusiast

Re: missing comments in views

I think the "before comments" stuff is fixed with TTU 8.2 ( v7.2 of SQL Assistant) or so I heard.
Enthusiast

Re: missing comments in views

All comments are retained with TTU 8.2