Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Tue, 05 Apr 2005 @ 19:10:30 GMT


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


Subj:   Re: Format function
 
From:   Michael Larkins

From your example a couple of things come to mind:


1. Is it possible that the original insert (if there was one) used BTEQ to load the table?

If so, it might have read something like:

     USING phone_num (CHAR(20))
      insert db.table1
      (:phone_num (format '--z(15)9'))

The USING defines the input data type as character and the associated format in the INSERT guarantees that the characters are interpretted properly.


2. When using the combination of QUERYMAN/SQL Assistant/ODBC formatted data is ignored by them. In order to see formatted data in these tools you must trick the ODBC by converting the formatted data to character which is simply passed through for display. I am wondering if the original SELECT was written to allow the formatted data to be seen and then when it was rewritten for insertion into a table the unnecessary parts were not removed (which should have been done).


For what it is worth, these are my SWAGs at something that almost resembles logic for them to exist in your INSERT. The critical word here is almost and almost only counts in horse shoes if your almost is closer than your opponents almost.

That is my story, my attempt at humor and I am sticking to it.


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: 28 Jun 2020