tablename > 30 characters

Database

tablename > 30 characters

Hi Everyone,

SELECT 'DROP TABLE ' || TRIM(DATABASENAME) || '.' || TRIM(TABLENAME) || ';'FROM DBC.TABLES WHERE DATABASENAME like '%abcdefg%'AND TABLEKIND = 'T'AND TABLENAME LIKE '%$%';

When I tried to run the above query, it is not returning tablenames with length >30 characters (I am able to create tables with length >30)..

What to do, if I want to get tablenames with length >30 characters. Please suggest.

Thanks 

2 REPLIES
Enthusiast

Re: tablename > 30 characters

please use dbc.tablesv instead of dbc.tables

Teradata Employee

Re: tablename > 30 characters

I believe you mean 'truncating'  instead of 'not returning':

 

 

 BTEQ -- Enter your SQL request or BTEQ command: 
ct "this EON table name has more than thirty ascii characters"
(docint integer);

 *** Table has been created.
 *** Total elapsed time was 1 second.

sel tablename from dbc.tables where tablename like '% EON %';
sel tablename from dbc.tablesv where tablename like '% EON %';

 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.

TableName
------------------------------
this EON table name has more t

 BTEQ -- Enter your SQL request or BTEQ command:
sel tablename from dbc.tablesv where tablename like '% EON %';

 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.

TableName
---------------------------------------------------------------------------
this EON table name has more than thirty ascii characters