Hello, I am sure someone will say - you should have looked through the forum for answers - well I did.
In SQL Server there are three types of temporary tables
table variables (1), #tables (2) and ##tables (3) - I am sure a teradata developer will know this.
I want to create type 2 that will disappear whent he session closes.
My query is wrapped in a cte
it does not have to select into it can be created and then inserted
create atble temptable2(...)
insert into temptable2
// I tried below and it does not work - please correct and advise also show how to do insert via cte
create volatile table temptable2 (a varchar(10),b varchar(10,c varchar(10))
At least you got 23 more hours to read the manuals :)
does not work is not a very precise error description, you probably didn't specify the COMMIT option correctly.
A direct translation of SQL Server's proprietary SELECT INTO syntax:
CREATE VOLATILE TABLE temptable2 AS
) WITH DATA
ON COMMIT PRESERVE ROWS