Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 22 May 2012 @ 15:33:39 GMT

  <Prev Next>  
Next> Last>>  

Subj:   TPT Exporter operator usage for pipe delimeter file.
From:   b.mahendrajallavenka


I am looking for pointers on TPT Exporter operator usage

Requirement : Export the data from a table to flat file with pipe delimiter

Error faced :

Assume that I need to export the below two columns then my typical syntax is below SELECT TRIM(ACCOUNTNAME)

     DEFINE OPERATOR data_reader()
            DESCRIPTION ' TPT Export Operator usuage'
            TYPE EXPORT
            SCHEMA source_table
              VARCHAR PrivateLogName        = 'c:\tpt\tpt_fastexport_log',
              INTEGER MaxSessions           =  5,
              INTEGER MinSessions           =  1,
              VARCHAR TdpId                 = 'XXXXXXX',
              VARCHAR UserName              = 'xxx',
              VARCHAR UserPassword          = 'xxxx',
              VARCHAR EscapeTextDelimiter   ='#',
              VARCHAR EscapequoteDelimiter  ='\',
              VARCHAR SelectStmt            =
                   'SELECT  TRIM(ACCOUNTNAME) ||'|'||   TRIM(CPU)  FROM DWH_DBA.ACCTG; '

When I run the script , I see a error " single pipe character " |" encountered where double is expected", which means the first chunk


is considered and second

     |  ' |'||   TRIM(CPU)  FROM DWH_DBA.ACCTG; '

as second part, so I need to escape the character 'ingle quotes' to achieve this, but I tried with different options and it didn't work out. Any pointers to problem would be of great help.

I tried

     'SELECT  TRIM(ACCOUNTNAME) ||#'|#'||        TRIM(CPU)  FROM DWH_DBA.ACCTG; '   (Same error)



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