Finding a particulor column in all the Teradata tables

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

Finding a particulor column in all the Teradata tables

Post 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
Rajasekhar
shamshad
Premium Member
Premium Member
Posts: 147
Joined: Wed Aug 25, 2004 1:39 pm
Location: Detroit,MI

Post 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'
Anrewm
Participant
Posts: 6
Joined: Wed Oct 20, 2004 10:55 am
Location: Minneapolis

Re: Finding a particulor column in all the Teradata tables

Post 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
Anrewm
Participant
Posts: 6
Joined: Wed Oct 20, 2004 10:55 am
Location: Minneapolis

Re: Finding a particulor column in all the Teradata tables

Post 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
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

Post by irajasekharhexa »

Thanks lot.

It's solved the Issue.
Rajasekhar
Post Reply