![](//teradataforum.com/imgs/ptdfw1.gif) |
![](//teradataforum.com/imgs/ptdfw2.gif) |
Archives of the TeradataForum
Message Posted: Thu, 22 May 2008 @ 21:45:23 GMT
Subj: | | Re: Getting column headers in Fast Export |
|
From: | | Michael Larkins |
Hello Peter:
FastExport is really geared for unloading millions of rows into a data file. It is not really intended to create a report with headings. If
you want headings and are working with a small amount of data (<500,000 rows), you should probably be using BTEQ instead. Otherwise your
FastExport will need two selects, the first one to select the headings you want. I don't think you really want to do this, but I could be
wrong.
.LOGON p/p, password
DATABASE db;
.EXPORT FILE=load_file_R.txt
SELECT
cast( coalesce(month_yyyymm , 'blank' ) AS CHAR(7)) AS month_yyyymm
,'|' (CHAR(1))
,cast( coalesce(buyer_verified , 'blank' ) AS CHAR(15)) AS buyer_verified
,'|' (CHAR(1))
,cast( coalesce(seller_verified , 'blank' ) AS CHAR(15)) AS seller_verified
from db.tbl1;
.QUIT;
This gives you a text file with the headings as the first line and one line for each row in tbl1;
Hope this helps,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
| |