Problem with title line when using .export report

Tools

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 MAXERROR 1

.set width 1300

.set titledashes off

.export report file= / ..... / test.csv

sel

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

.exit

EOF

mailx -s "Daily Report" -a / ..... / test.csv

Tags (3)
2 REPLIES
Senior Apprentice

Re: Problem with title line when using .export report

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.

Dieter

Re: Problem with title line when using .export report

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.