Toad World® Forums

Comments not exported in in Create scripts on Teradata

I’m using Toad Data Point 4.2.1.303 (64 bit) with a teradata

select * from dbc.dbcinfo;

db_info.png

If i create a table and comment on it:

CREATE TABLE xyz

( test number);

comment on xyz

‘this is a table comment’;

comment on xyz.test

‘this is a column comment’;

I can see the data in the Data Dictionary

select tablename,columnname,commentstring

from dbc.columnsv

where tablename=‘XYZ’

table_info.png

select tablename,commentstring

from dbc.tablesv

where tablename=‘XYZ’

columninfo.png

If i use the export from the object explorer (generate sql --> create script --> to editor), i don’t get the comments

right_click.png

This is what i get:

CREATE SET TABLE xyz ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
test NUMBER)
PRIMARY INDEX ( test );

Is there a option to get the comments?

I don’t see an option for this, but TDP should be including the comments.

What version of Teradata? Using ODBC to connect, or native?

Also, couple things to check:

  1. Scroll down to the end of your Editor contents to make sure that the COMMENT commands aren’t all the way at the bottom. I have seen where there are multiple blank lines separate the COMMENT code from last of the CREATE TABLE block. These last lines are easy to miss if I don’t scroll all the way down.

  2. Bring up the Doc Viewer for the table (right-click table and choose “View Details”) and then hop over to the Script tab. Does the generated script show the COMMENT lines?

If COMMENT lines aren’t showing up in the Script tab, then let’s get this over to our Dev team to look at.

In the doc viewer the comments are not shown

in the properties tabs, i can see both column and table columns

According to dbc.dbcinfo our Version ist 15.10.07.04

Asking Support/Dev team to take a looksie…

Comments are not part of CREATE TABLE DDL that’s why they were not included in the script.

I create a task QAT-12381 to add the option to include comments into the Script.

Regards

Aleksey