﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Tools and Utilities  / Issues with EXPORT OUTPUT DATE FIELD is not coming correctly / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Sat, 21 Nov 2009 21:14:36 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Issues with EXPORT OUTPUT DATE FIELD is not coming correctly</title><link>http://www.teradata.com/teradataforum/Topic15922-10-1.aspx</link><description>I would not be able to cast it as the SQL is generated dynamically. I thought to cast it to char with length based on column length from the table, but since I see that it is 4, that is also had to to be dropped.</description><pubDate>Fri, 26 Jun 2009 06:28:13 GMT</pubDate><dc:creator>prajithvarreir</dc:creator></item><item><title>RE: Issues with EXPORT OUTPUT DATE FIELD is not coming correctly</title><link>http://www.teradata.com/teradataforum/Topic15922-10-1.aspx</link><description>Hello,Integer-date has a length 4, there is no issue with that. Try by casting it to CHAR/VARCHAR, that should solve the issue.HTH!Regards,Adeel</description><pubDate>Fri, 26 Jun 2009 05:49:36 GMT</pubDate><dc:creator>Adeel.Chaudhry</dc:creator></item><item><title>Issues with EXPORT OUTPUT DATE FIELD is not coming correctly</title><link>http://www.teradata.com/teradataforum/Topic15922-10-1.aspx</link><description>I have some issues with TD Export command. The SQL I use in export command is SELECT BUSINESS_UNIT ,' | ',EFFDT ,' | ',EFF_STATUS  FROM ABC The output of this is spooled to a file called ABC.txt. $ head ABC.txt01454 | 06/0 | A | 01731 | 06/0 | A | G0360 | 06/0 | A | 01700 | 06/0 | A | 01810 | 06/0 | A | 01500 | 06/0 | A | When I run the query in query man, I get correct data. Result set attached below01454 | 01/01/2006 | A |01731 | 01/01/2006 | A | G0360 | 01/01/2006 | A | 01700 | 01/01/2006 | A | 01500 | 01/01/2006 | A | Interestingly, when I check DBC.COLUMNS, I find that this date field is has a column width 4.ColumnName    ColumnType    ColumnLengthBUSINESS_UNIT                     CV   5EFFDT                                  DA   4EFF_STATUS                         CV   1Code Snippet of the BTEQ script as follows/****************************************************************************************Set the export file as table name with extension as .txt****************************************************************************************/.SET FULLYEAR ON;.EXPORT DATA FILE=$TABLE_NAME.txt/****************************************************************************************Run the select statement in the file created by shell script****************************************************************************************/. run file $COL_FILE_NAME.SET FORMAT OFF;.EXPORT RESET</description><pubDate>Fri, 26 Jun 2009 05:40:02 GMT</pubDate><dc:creator>prajithvarreir</dc:creator></item></channel></rss>