Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Thu, 05 May 2016 @ 22:59:00 GMT


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


Subj:   Re: TPT - can it handle double quotes
 
From:   McCall, Glenn David

Generally, the purpose of the quotes is to allow for fields that might contain the delimiter - that is, quotes disable delimiters within a field.

For example consider the following CSV.

Field 1,"field2a, field2b", field 3

In the above example, the quotes disable the comma delimiter between field2a and field2b. Therefore the input consists of 3 fields as follows:

     * Field 1
     * field 2a, field 2b
     * field 3

Therefore, if quotes are being used, they need to enclose a whole field. To highlight this, what would this input be?

Field 1,"field 2" field "3, field 4", she said "hello, there"

It starts to get a bit confusing.

In your example, the quotes do not enclose an entire field and so the loader gets confused as to your intent.

Your options include:

* Do not use " as the quote character to enclose delimters in fields - this means your field will be loaded with the double quotes into the table. You could then remove them via an update, or via string operations in your load job (e.g. substr, index etc).

* build an INMOD to deal with your specific case.


As a matter of interest, do you want to strip of the quotes? My assumption would be that the quotes are part of the name - even though that looks odd.

But it looks odd that "Pacific heights" is enclosed in quotes in the first place as the quotes seem to serve no purpose whatsoever (at least as far as load jobs go).


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: 24 Jul 2020