SET SESSION DATEFORM = ANSIDATE doesn't seem to be working in BTEQ

214 views Asked by At

This is the BTEQ call I'm using:

.EXPORT REPORT FILE = OUTPUT_FILE;

SET SESSION DATEFORM = ANSIDATE;

SELECT * FROM TABLE_NAME
;

Dates keep coming up as IntegerDates YY/MM/DD

Teradata 16.xx. Is this not supported by BTEQ/Unix?


Update: Fred's solution (worked like a charm)

ALTER TABLE TABLE_NAME ADD COLUMN_NAME DATE FORMAT 'MM/DD/YYYY';
1

There are 1 answers

0
Fred On BEST ANSWER

The SESSION DATEFORM is a default. It applies to string values being supplied for dates or to date expressions that don't have an explicit FORMAT. It will also be used to set the FORMAT for date columns if you don't specify one in your DDL. But if a table already exists, the defined column FORMAT will override