Archives of the TeradataForum
Message Posted: Fri, 15 Nov 2002 @ 09:12:46 GMT
Subj: | | FAST EXPORT into .csv |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Friday, November 15, 2002 03:57 -->
Hi,
Whats the best way to get the output of FASTEXPORT into a .CSV file? I've been doing the following which works - but I'm wondering if
theres an easier/better way as it gets a bit 'interesting' with more complicated SQL statements..
Thanks
#!/bin/ksh
DBNAME=test ; export DBNAME
TABLENAME=XXX ; export TABLENAME
OUTFILE=${TABLENAME} ; export OUTFILE
OUTPATH=/data ; export OUTPATH
NODPATH=${OUTPATH}/${OUTFILE}_nod ; export NODPATH
mknod ${NODPATH} p
cd ${OUTPATH}
cat ${NODPATH} | sed 's/^.//g' |split -l 10000000 - ${OUTFILE} &
fexp <
|