The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 08:59 AM
UNIX export command - memory space Nomaad UNIX for Advanced & Expert Users 2 04-10-2006 08:49 PM
How to export data file from Unix whatisthis UNIX for Dummies Questions & Answers 20 03-03-2005 02:16 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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..
  #2 (permalink)  
Old 07-02-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,864
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, select an appropriate forum for your post. A long script in a scripting language most people have never heard of does not belong in "dummies questions and answers".

Thank You.

The UNIX and Linux Forums
Sponsored Links
Reply

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 10:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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