All Forums Database
lee_str 5 posts Joined 07/04
31 Aug 2015
Need Column Name with Longer than 30 Characters

I am using Teradata SQL (version 13.10)  in cominbation with a "Text to XLS" program to create an Excel File.
This excel file replicates a template used to upload data into another system.  I have no control over the layout of the excel file.  Furthermore, the column headings (generated in the SQL) must be a 100% match, or the import fails.  One of these column names is 33 characters long.  
The example of below generates the same error I'm receiving.  I know that this version of Teradata (13.10) has a max column length of 30 characters.  
I'm wondering if there is a way to "trick" the system into allowing me to have more than 30 characters show in a column name.

select a.column_name as "this is a required 33 char string" 
from	dbc.databases 
where	databasename like '%calendar%'

Thank you!

kirthi 65 posts Joined 02/12
01 Sep 2015
select DATABASENAME AS "this is a required 33 char string"
from    dbc.databases 
where   databasename like '%calendar%'


this is a required 33 char string

Use double quotes instead of single quotes, it will treat like title instead of alias, Titles doesnt have 30 character limit i suppose

david.craig 73 posts Joined 05/13
02 Sep 2015

Titles of up to 60 characters are allowed in 13.10, but titles are not column names. There is no way around this. You need to use the 14.10 Extended Object Names feature.

talk2soumya 28 posts Joined 11/11
02 Sep 2015

Dave is correct. You need to utilize EON which is supported by 14.10. There is a DBS control flag which needs to be set and database restart is must.

lee_str 5 posts Joined 07/04
03 Sep 2015

Ah, I was afraid of that.  Thanks!

You must sign in to leave a comment.