Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Data from Teradata Help Statistics

Status
Not open for further replies.

TheVMan

IS-IT--Management
Feb 19, 2001
110
US
In Teradata, a HELP STATISTICS TABLE_NAME returns the date, time, and number of unique values by column name, in the format:

DATE TIME UNIQUE VALUES COLUMN NAME
5/5/2002 7:00am 84,000 ACCOUNT_ID

The question is, I can't figure out how to parse through the column COLUMN NAME since it has a space. For example:

<cfif #query.COLUMN NAME# is &quot;ACCOUNT_ID&quot;>

failes on the NAME part. Apparently doesn't like the space. Can anyone make a suggestion on this?
 
I am not familiar with teradata -- how are you doing the query? Usually with sql, you can alias the column, e.g

Select Date, Time, [UNIQUE VALUES]as Unique_Values, [Column Name] as Column_Name from

etc...




 
Unfortunately, HELP STATISTICS TABLE_NAME is the command executed to return the result. It is a reserved word, and aliasing is not allowed. If there was a way to get CF to handle the space in the column name of the results, that'd be great.

Thanks.
 
VMan, did you try bracketing the column name:


query.[column name]

HTH,
PH
 
As a start, I'd write a page that executed the query then use a <cfoutput> to check the value of queryname.ColumnList -- this will show you what ColdFusion thinks the name of the query column is.
Code:
<cfquery name=&quot;myQuery&quot;>
   HELP STATISTICS TABLE_NAME
</cfquery>
<cfoutput>
   #myQuery.ColumnList#
</cfoutput>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top