Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 16 Jan 2008 @ 21:28:20 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Convert time from twenty four hour to twelve hour format
 
From:   Michael Larkins

Hello Geoffrey:

I always appreciate an opportunity to learn something new, no matter how far it might be off the beaten path. At the same time, I think this one needs to fall into my category of "I would never do that one even though it works nor recommend anyone else do it."

My reasoning:

1. You have to write two CAST operations instead of one

2. If I am going to use an extension, I like the TD extension of no CAST operations needing to be written

3. It just plan looks "weird as all get out" using an attribute in a CAST

4. You cannot make the blanket statement that any attribute can be substituted in CAST (TITLE for instance)

5. CAST was intended to convert from one data type to another data type

6. It would not be portable to another database


At least in the future I shouldn't repeat the mistake of saying that it will never work on Teradata. At the same time I did experience something interesting in my testing - your method works with the reserved word of CURRENT_TIME, but not with TIME.


Regards,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



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