Export output file formatting
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Export output file formatting Expand / Collapse
Author
Message
Posted 6/25/2009 5:16:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/12/2009 3:11:28 AM
Posts: 6, Visits: 24
Hi Guys,

I am using an export command in a BTEQ script. The output file needs to be formatted to get the a comma, pipe(|) or ~ delimited file. Can you guys please help me in this regard? The SQL Statement that I am passing to do this Export command is dynamic, hence can not be pre appended with any of the delimiters.

The Code snippet would look like this

.EXPORT DATA FILE=$TABLE_NAME.txt
/**************************************************************************************************
Run the select statement in the file created by shell script
**************************************************************************************************/
. run file $COL_FILE_NAME

Content of the $COL_FILE_NAME is something that would change dynamically during execution


Thanks and Regards!

Prajith Varrier
Post #15901
Posted 6/25/2009 10:20:57 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 10/22/2009 10:24:19 AM
Posts: 39, Visits: 213


Take a look at the Linux/Unix 'sed' command.

HTH.

Cheers.

Carlos.
Post #15905
Posted 6/25/2009 11:36:01 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 11/5/2009 3:21:51 PM
Posts: 101, Visits: 241
You cannot do it if you are exporting a DATA file.
If you can do an EXPORT REPORT, you can:

.SEPARATOR '|'

(or whatever separator you want.)

If you do this, everything will come out as characters, you must suppress pagelength/ headings and column headings (you can only do this in your SQL), and the maximum line length is 265 characters.
Post #15908
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 1:27am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.047. 9 queries. Compression Disabled.