Best way to produce automated exports in tab-delimited form from Teradata?

Posted by Cade Roux on Stack Overflow See other posts from Stack Overflow or by Cade Roux
Published on 2010-03-18T17:45:50Z Indexed on 2010/03/18 17:51 UTC
Read the original article Hit count: 508

Filed under:
|
|
|
|

I would like to be able to produce a file by running a command or batch which basically exports a table or view (SELECT * FROM tbl), in text form (default conversions to text for dates, numbers, etc are fine), tab-delimited, with NULLs being converted to empty field (i.e. a NULL colum would have no space between tab characters, with appropriate line termination (CRLF or Windows), preferably also with column headings.

This is the same export I can get in SQL Assistant 12.0, but choosing the export option, using tab delimiter, setting my NULL value to '' and including column headings.

I have been unable to find the right combination of options - the closest I have gotten is by building a single column with CAST and '09'XC, but the rows still have a leading 2-byte length indicator in most settings I have tried. I would prefer not to have to build large strings for the various different tables.

© Stack Overflow or respective owner

Related posts about teradata

Related posts about etl