Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 23 Nov 2006 @ 17:00:24 GMT


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


Subj:   Re: Fastexport Script for Double Byte Characters
 
From:   Satish_Nalam

Takahashi,

I am using the UNICODE characterset only. But still I am facing some issue like record is breaking to the next line.

Here is the script I am using. Please correct me the area where I am going wrong.

     fexp -c "UTF8" << EOF
     .LOGTABLE pulse_inc_t.event_exp;
     $TD_LOGON;

     .BEGIN EXPORT SESSIONS 12;

     SELECT cast((COALESCE(CAST(e."event_id"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."UPDATE_DATE"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."UPDATE_DTS"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."UPDATE_UID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_LOADER_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."SOURCE_SITE_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."SOURCE_SYSTEM_TRANS_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."SRC_SYS_TRANS_ATTRIBUTE"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_LINK_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_LINK_ATTRIBUTE_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."AFFINITY_CONTACT_PARTY_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EMAIL_ADDRESS"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."DOMAIN_EMAIL_ADDRESS"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."CONTACT_FIRST_NAME"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."CONTACT_LAST_NAME"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."CONTACT_FULL_NAME"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."CONTACT_PHONE_NUM"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."CUSTOMER_NUM"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."COMPANY_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."COMPANY_NAME"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."GLOBAL_PARENT_COMPANY_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."GLOBAL_PARENT_COMPANY_NAME"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."LOCAL_CHANNEL"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."BUSINESS_UNIT_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."ISO_COUNTRY_CODE"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."DELL_CONTACT_CENTER"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."DELL_AGENT_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EXCEPTION_CD"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_DATE"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_DTS"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_TYPE_CD"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_SUB_TYPE_CD"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."CONTACT_METHOD_CD"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_SVC_PRIORITY_DESC"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."ISO_LANGUAGE_CODE"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_TRIGGER_ID"  AS VARCHAR(200)), ''))
     || '|~|' || (COALESCE(CAST(e."EVENT_TRIG_ATTRIBUTE_ID"  AS VARCHAR(200)), ''))
     || '|~|' as CHAR(400))
     FROM pulse.event e where update_date(date, format 'yyyy-mm-dd') >= date - $NUMBER_OF_DAYS;

     .EXPORT OUTFILE event.dat  format text mode record;

     .END EXPORT;
     .LOGOFF;


     EOF

Regards,

Satish Kumar Nalam



     
  <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