All Forums Database
Nikhil_Teradata 24 posts Joined 10/13
26 May 2015
Need help in insert date statement

Hi,
Here is my insert statement.

CREATE  VOLATILE TABLE A (ClickLoad_Dt DATE FORMAT 'yyyy/mm/dd');

INSERT INTO A(ClickLoad_Dt)
SELECT MAX(CAST (click_dt AS DATE FORMAT 'yyyy/mm/dd') ) FROM B;

SELECT * FROM A

I get and empty table even though the answer to below query is 5/25/2015

SELECT MAX(click_dt) FROM B

I am not able to figure out what is happening. I appreciate all the help I can get.

--Nik

"Learn, Learn, Learn and your life would never be boring"

Tags:
CarlosAL 512 posts Joined 04/08
27 May 2015

Hi.
ON COMMIT PRESERVE ROWS is missing in your CREATE TABLE definition.
Cheers.
Carlos.

Nikhil_Teradata 24 posts Joined 10/13
27 May 2015

Thanks man...... working perfectly now.... Such a small thing.... :)

--Nik

"Learn, Learn, Learn and your life would never be boring"

You must sign in to leave a comment.