Archives of the TeradataForum
Message Posted: Thu, 08 Nov 2007 @ 09:42:09 GMT
Subj: | | Re: Extracting time from numeric field |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Wed, 7 Nov 2007 22:23 -->
Parentheses seem wrong around your Teradata-style typecast:
cast(substring((trim(drv.DT_TM_NUM))(char(25)) from 9 for 6)
as time(6)) abc,
You could fix the parentheses, but it would be better to use ANSI CAST() form. From the SQL supplied, the implication would be that you want
cast(substring(cast(trim(drv.DT_TM_NUM) as char(25)) from 9 for 6) as time(6)) abc,
But that doesn't seem to make much sense. Think about what you really need.
|