|
|
Archives of the TeradataForum
Message Posted: Fri, 27 Apr 2007 @ 18:42:09 GMT
Subj: | | Re: SQL Assistant - Export Results |
|
From: | | Bob Widman |
The most successful approach was concatenating trimmed columns as a single column, changing the tab to a vertical bar, and losing the
requirement for a header row. The resulting run file looked similar to the following:
.logon uid,pwd
.set width 160
.set titledashes off
.set format off
.export report file=c:\export\exportfile.txt
select
trim(tbl_a_smallint1) || '|' ||
trim(tbl_a_date1) || '|' ||
trim(tbl_a_char1) || '|' ||
trim(sum(tbl_a_int1 - tbl_a_int2)) || '|' ||
trim(tbl_a_decimal1 (format 'ZZZZZ9.99'))
from
edw_tbls.tbl_a
group by
tbl_a_smallint1,
tbl_a_date1,
tbl_a_char1,
tbl_a_decimal1
order by
tbl_a_smallint1,
tbl_a_date1,
tbl_a_char1
;
.quit
Thanks for the hints.
| |