The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can any one share a unix script for validating the export of a mapping which is in XM perlamohan Shell Programming and Scripting 1 11-09-2008 09:04 PM
Can any one share a unix script for validating the export of a mapping which is in XM perlamohan UNIX for Advanced & Expert Users 1 11-08-2008 01:27 PM
A Fast File System For Unix sigismo UNIX for Advanced & Expert Users 2 10-16-2008 09:59 AM
UNIX export command - memory space Nomaad UNIX for Advanced & Expert Users 2 04-10-2006 09:49 PM
How to export data file from Unix whatisthis UNIX for Dummies Questions & Answers 20 03-03-2005 02:16 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-29-2009
depakjan depakjan is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 11
Fast export in unix

/opt/teradata/client/bin/fexp <<EOP

.LOGTABLE load_work.datastore_log1 ;
.LOGON BOX/userid,password;
.BEGIN EXPORT
SESSIONS 20;
.EXPORT OUTFILE $path MODE RECORD FORMAT TEXT;

select
trim(cast(PROC_YYMM_DT as char(5))) (title ''),
cast('~' as char(1)),
trim(cast(ACCNO as char(21))) (title ''),
cast('~' as char(1)),
(CASE
WHEN ACC_CO_NO IS NULL
THEN CAST('?' AS CHAR(1))
ELSE trim(CAST(ACC_CO_NO AS char(21)))
END) (title ''),
cast('~' as char(1)),
trim(cast(ACC_APPSYS_ID as char(3))) (title ''),
cast('~' as char(1)),
(CASE
WHEN ACC_CHFGL_MT_TR_AM IS NULL
THEN CAST('?' AS CHAR(1))
ELSE trim(CAST(ACC_CHFGL_MT_TR_AM as char(18)))
END) (title ''),
cast('~' as char(1)),
(CASE
WHEN ACC_CHFGL_LT_TR_AM IS NULL
THEN CAST('?' AS CHAR(1))
ELSE trim(CAST(ACC_CHFGL_LT_TR_AM as char(18)))
END) (title ''),
cast('~' as char(1)),
(CASE
WHEN ACC_RECGL_LT_TR_AM IS NULL
THEN CAST('?' AS CHAR(1))
ELSE trim(CAST(ACC_RECGL_LT_TR_AM as char(18)))
END) (title ''),
cast('~' as char(1)),
(CASE
WHEN BNKRPT_NOTIFTN_DT IS NULL
THEN CAST('?' AS CHAR(1))
ELSE CAST(CAST(BNKRPT_NOTIFTN_DT AS FORMAT 'YYYY-MM-DD')
AS CHAR(10))
END) (title '')
from vrtl.core_rcvry
where
proc_yymm_dt = 10811 and
acc_appsys_id in ('599');

.END EXPORT ;
.LOGOFF;
EOP

~ as delimiter

i am using the following query to fast export.. but i getting some junk characters prefixed to each column value ... what is the problem??.... it queries perfectly in teradata though..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0