Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 30 Nov 2005 @ 11:15:05 GMT


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


Subj:   Re: Dropping double quotes from VARCHAR cols
 
From:   McCall, Glenn David

I presume the quotes are at the beginning and end of the variable length text.

Have you tried using substring?

For example in your mload dml try something like the following:

     .dml label allrecs;
     insert into adwh.item_subclass_test (
         :Item_Subclass_Cd,
         :Item_Class_Cd,
         substring (:Item_Subclass_Name from 2 for (characters
     (:item_subclass_name) - 2))
         );

The above substring removes the first and last character from the item_subclass_name field.

My example is an all or nothing approach. It always removes the first and last characters - no matter what they are. If you need to be selective, consider trying a case statement.


I hope this helps

Glenn Mc



     
  <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