Page 1 of 1

Finding a particulor column in all the Teradata tables

Posted: Thu Nov 08, 2007 10:57 am
by irajasekharhexa
Hi,


We are using the Teradata as Target Database. But in some tables we defined one column CUSTOMER_ID as Decimal now we want to modify as Varchar.

But we are not sure in how many and what exactly tables we have defined with the coulmn CUSTOMER_ID.

Instead of checking manually each and every job/Teradata Table

Is there any way in identifying that this particulor column using list of teradata tables?

Alternatively is there any way to Identify in which Jobs/Teradata Table we are using this CUSTOMER_ID.


Thanks in Advance

Posted: Thu Nov 08, 2007 1:42 pm
by shamshad
Select DatabaseName, TableName, ColumnName, ColumnFormat, ColumnTitle, SPParameterType, ColumnType, ColumnUDTName, ColumnLength, DefaultValue, Nullable, CommentString, DecimalTotalDigits, DecimalFractionalDigits, ColumnId, UpperCaseFlag, Compressible, CompressValue, ColumnConstraint, ConstraintCount, CreatorName, CreateTimeStamp, LastAlterName, LastAlterTimeStamp, CharType, IdColType, AccessCount, LastAccessTimeStamp, CompressValueList
From DBC.Columns WHERE DATABASENAME='<database_name>' AND COLUMNNAME='CUSTOMER_ID'

Re: Finding a particulor column in all the Teradata tables

Posted: Thu Nov 08, 2007 2:00 pm
by Anrewm
irajasekharhexa wrote:Hi,


We are using the Teradata as Target Database. But in some tables we defined one column CUSTOMER_ID as Decimal now we want to modify as Varchar.

But we are not sure in how many and what exactly tables we have defined with the coulmn CUSTOMER_ID.

Instead of checking manually each and every job/Teradata Table

Is there any way in identifying that this particulor column using list of teradata tables?

Alternatively is there any way to Identify in which Jobs/Teradata Table we are using this CUSTOMER_ID.


Thanks in Advance
If you need to look at the Jobs in DS, export the jobs / project into a dsx file and you can search for the CUSTOMER_ID field. If you have a advanced text editor like ultraedit you can infact count all the occurances of that particular field in the file.

Anrew

Re: Finding a particulor column in all the Teradata tables

Posted: Thu Nov 08, 2007 2:08 pm
by Anrewm
irajasekharhexa wrote:Hi,


We are using the Teradata as Target Database. But in some tables we defined one column CUSTOMER_ID as Decimal now we want to modify as Varchar.

But we are not sure in how many and what exactly tables we have defined with the coulmn CUSTOMER_ID.

Instead of checking manually each and every job/Teradata Table

Is there any way in identifying that this particulor column using list of teradata tables?

Alternatively is there any way to Identify in which Jobs/Teradata Table we are using this CUSTOMER_ID.


Thanks in Advance
If you need to look at the Jobs in DS, export the jobs / project into a dsx file and you can search for the CUSTOMER_ID field. If you have a advanced text editor like ultraedit you can infact count all the occurances of that particular field in the file.

Anrew

Posted: Fri Nov 09, 2007 5:43 am
by irajasekharhexa
Thanks lot.

It's solved the Issue.