Comments within Views

Database
N/A

Comments within Views

All

I have a question on comments within a VIEW DDL (Single line and Multi-line comments).
I was told by one of the developers that the modification history (as Comments) he maintained are no longer visible. We moved from R5 to V2R.06.00.02.12 few months back.

I was also highlighted that the comments showed up when he did a SHOW VIEW in prior version.

Have you heard of anything like this before?
Is there a way to circumvent this problem?

Please let me know.

Vinay
3 REPLIES
Teradata Employee

Re: Comments within Views

The DBMS doesn't strip off the comments, but versions of the ODBC driver and SQL Assistant may.

To work around this in SQL Assistant, run the CREATE VIEW using "Execute Parallel" (with only a single request, since it's a DDL statement) instead of "Execute".

If it's the ODBC driver, in SQL Assistant you can un-check "Allow use of ODBC SQL extensions" option and/or in the ODBC configuration you can check the "Disable parsing" option.

Or, of course, you could also avoid using an ODBC-based tool for your DDL; e.g. use BTEQ instead.
N/A

Re: Comments within Views

Thanks Fred!!

Only execute parallel option worked.
I tried all other options, it doesn't seem to like it.
Even BTEQ which uses NATIVE drivers did not capture the comments.
At least there is a work around for the developers.

Vinay
JvR
N/A

Re: Comments within Views

I had the problem solved on my site by telling developers to use only the "documented" syntax /* comment */ instead of the older versions like -- comment -- . No more problems so far...

The -- way of denoting comments is obsolete. I think as of ODBC-version 3.003.03, the comments between -- don't show anymore though ODBC whereas the comments between /* */ do.

HTH.