Returning the date in valid format.

Database

Returning the date in valid format.

 

Hi, hope you all are doing fine.

My query is regarding creating a table with two insert statements. Here's a summary:

Step 1:

Create Table Table1 AS

(Select SuperTable.Column1,

SuperTable.Column 2,

SUM(... A sum statement...) AS "Budget",

MAX( ... A max statement ... as DATE ) ELSE  NULL END ) AS "Last Update Date"

From (...bunch of statements)

Where (...bunch of statements)

Group By

1,

2) with Data;

Step 2:

Alter Table Table1

ADD "New field 1"

Step 3:

Insert into Database.Table1

Select SuperTable.Column1,

SuperTable.Column 2,

0,

1990/01/01,

SUM(... A sum statement...) AS "New Field 1",

From (...bunch of statements)

Where (...bunch of statements)

Group By

1,

2;

My query is failing with 2665: Invalid data format (which is probably got to to with 1990/01/01. My question to you here is what is the correct data format to be used in Teradata?

Thanks for your time, and have a great day,

Saad

1 REPLY
Junior Contributor

Re: Returning the date in valid format.

It's DATE '1990-01-01'

Dieter