Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 19 Aug 2002 @ 12:33:42 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Extract Hour from integer column
From:   N.D.Rajesh Kumar


Iam using a table time_hist with the column start_time as integer, and has data 11:00:00(inserting using formate option). Now i want to extract hour from this column, for this iam using the following query in Queryman.

select extract(hour from cast(start_time as time)) from time_hist;

but it gives the following error.

Error code 5326: Operand of Extract function is not a valid data type or value.

The same query with out extract function is working fine in queryman, but same query not working in Bteq.

select cast(start_time as time) from time_hist;

Please help me in this issue, just i want to extract hour,mint,sec from an integer column by casting it to time data type.

Thanks in advance.


N.D.Rajesh KumarSystech Solutions, Chennai

  <Prev Next>  
Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020