All Forums Database
pradeepchakka 1 post Joined 08/13
30 Oct 2015
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 

 

~Pradeep
kirthi 65 posts Joined 02/12
30 Oct 2015

please use dbc.tablesv instead of dbc.tables
 

david.craig 73 posts Joined 05/13
30 Oct 2015

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

 

You must sign in to leave a comment.