|
|
Archives of the TeradataForum
Message Posted: Wed, 19 Nov 2003 @ 16:19:00 GMT
Subj: | | Re: Fexp script to a CSV file |
|
From: | | Frank O Connor |
Hi
Unfortunately the way I have always done it (using fastexport for MVS) is like follows
select
trim(first_name) || ',' ||
trim(last_name) || ',' ||
trim(coalesce(salary, 0)) || ',' ||
trim(age)
from tablea;
It is a nuisance as firstly you need to trim each column to get the advantage of a csv (ie a smaller file). Also, you need to
concatenate all columns and add in the commas. Finally, watch out for nullable columns. If you do not coalesce or use a case expression,
the complete resultant row will be null.
God Luck
Frank
| |