cancel
Showing results for 
Search instead for 
Did you mean: 

Temporary table error in hana

Former Member
0 Kudos

Hi,

I have created a temporary table in hana SQL console using the following syntax.

create global temporary column table "MONISSHAA"."DUMMY"(ID nvarchar(1));

insert into "MONISSHAA"."DUMMY" values('1');

The select * statement below returns one record

select * from "MONISSHAA"."DUMMY"

But the data preview on the temporary table directly  shows zero records returned.

How is this temporary table concept working??

Kindly clarify this.

Thanks & Regards,

Monissha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Monissha,

     Temporary tables can be created at runtime and can do the all kinds of operations that one normal table can do. But, based on the table types, the scope is limited.

    • Temporary Tables lets you store and process intermediate results.
    • Temporary tables only last as long as the session is alive.
    • Data in temporary tables is automatically deleted at the end of the database session, even if it ends abnormally.

That's why the table which you created, can be used to fetch data using the select query but you will not find any data while using the data preview.

Cheers,

Sumit

Former Member
0 Kudos

Hi Sumit,

It seems like a new session is created when I do a data preview. Similarly when ever a user opens a SQL console, a new session is created every time. Thus in case of temporary table the user can work independently with the same temporary table in multiple consoles.

Thanks,

Monissha

Former Member
0 Kudos

Hi Monissha,

     Yes! You have got it right

Cheers,

Sumit

Answers (0)