All Forums Tools
andyh2000 2 posts Joined 05/13
02 May 2013
Problem with title line when using .export report

Hi,  I am having the following problem when trying to create a CSV report  to email out.  The title line of the report is showing up like this "((((((((((((((((((((((((((((((((((((((((((((((((((AGT _ENT_US" instead of all the field names.  The records themselves are showing up properly.
.set width 1300
.set titledashes off

.export report file= / ..... / test.csv
agt_ent_user_id || ',' ||
user_frst_nm || ',' ||
user_last_nm || ',' ||
CCTR_SITE_NM || ',' ||
mgr_ent_user_id || ',' ||
from a.b
order by agt_ent_user_id, evt_dt;
.export reset;
.set echoreq on
mailx -s "Daily Report" -a / ..... / test.csv

dnoeth 4628 posts Joined 11/04
02 May 2013

What do you expect? There's only one column in your output, the column name is automatically created and the optimizer tends to add a lot of brackets.
If you want the fieldnames you have to write another comma-delimited string consisting if all the column names.
Better get rid of the title by adding (TITLE '') to the calculation.


andyh2000 2 posts Joined 05/13
03 May 2013

Maybe I should have said I am new to BTEQ / Teradata.
I don't understand how to add the field names using another comma delimited string.

You must sign in to leave a comment.